Problem/Motivation

A screenreader user does not know what happens when the link/flag is clicked.

Steps to reproduce

Create a flag with ajax link and ask a screenreader user what the screenspeacker does after clicking the flag.

Proposed resolution

* Send the message via Drupal.announce. See https://www.drupal.org/docs/drupal-apis/javascript-api/accessibility-too...

Found by https://www.drupal.org/u/westphaldenn

Issue fork flag-3260640

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tobiasb created an issue. See original summary.

tobiasb’s picture

Issue summary: View changes
tobiasb’s picture

Assigned: tobiasb » Unassigned
Status: Active » Needs review
StatusFileSize
new1.32 KB
tobiasb’s picture

Updated patch for flag 8.x-4.0-beta4.

Status: Needs review » Needs work

The last submitted patch, 4: flag-3260640-ajax-link-message-announce-4.patch, failed testing. View results

tobiasb’s picture

Status: Needs work » Needs review
StatusFileSize
new1.16 KB

Status: Needs review » Needs work

The last submitted patch, 6: flag-3260640-ajax-link-message-announce-6.patch, failed testing. View results

tobiasb’s picture

Status: Needs work » Needs review
StatusFileSize
new2.98 KB
new2.11 KB

Wrong lib name and pageTextNotContains can not be used anymore.

tobiasb’s picture

StatusFileSize
new2.09 KB
tr’s picture

Is there a difference between the MR and the patch? I don't know what to review here. Patches should be hidden IMO because they can't be tested.

I'm in favor of doing this, but there really needs to be a test for this feature. There are lots of FunctionalJavascript tests in this module that you can use as an example.

tobiasb’s picture

No. The static patch is for https://www.drupal.org/project/openculturas ;-).

tr’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

You can still use the patch that way if it's hidden. And hiding it will make it clear what needs to be reviewed and committed. The patch in this case seems to be just secondary and only so that a specific set of changes can be loaded by composer in another project.

Regardless, I don't see anything wrong with the MR. It works, but it still needs tests.

sim_1’s picture

Thanks for the patch @tobiasb and the updates to it! I find the static patches helpful also because it helps me track which version I've applied to the site without having to scan through a bunch of commit hashes.

tobiasb’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests

There was a test :D

ivnish’s picture

Version: 8.x-4.x-dev » 5.x-dev

deaom made their first commit to this issue’s fork.

deaom’s picture

Status: Needs review » Reviewed & tested by the community

Was already confirmed as working, re-based branch, tests are passing.

  • ivnish committed 58da2692 on 5.x authored by tobiasb
    [#3260640] feat: A11y: Send the status message via drupal.announce
    
    By:...
ivnish’s picture

Status: Reviewed & tested by the community » Fixed

Merged! Thanks!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.