Problem/Motivation
Currently if a user filters any kind of view that uses AJAX there is no notification to a screen reader user that content on the page has changed.
Steps to reproduce
- Create view through UI with exposed filters
- Enable AJAX on view
- Vist view to test filter and interact with exposed filter
- On submit no notification is provided for screen readers
Proposed resolution
Provide by default aria-live notifications when views with exposed filters are updated.
- Ideally the page/content would only change when the submit button is clicked
aria-live=”polite”is located on the<header>in the view to update screen readersaria-live=”polite”is located on the no results option in the view to update screen readers
We could also consider leveraging the Drupal core announcement functionality to notify screen readers.
Remaining tasks
Determine effective implementation for notifications- Open a new issue for creating notification text management feature
- Implement Drupal Announce on exposed filter ajax submit
- Add testing
- Community testing & accessibility review
- Make Drupal even more accessible!
User interface changes
Provide an option for editors to modify or adjust the text within the aria-live notification.
A potential example: Adjust notification to read x number of items found, users could replace `items` with term or content type.
API changes
TBD
Data model changes
No changes anticipated.
Comments
Comment #2
mgiffordI think this fits under WCAG SC 4.1.3.
Comment #4
aaronbaumanUsing Announce seems like the way to go here, since that already defines an aria-live component.
Pretty sure this is how exposed filters work, unless you have a contrib like Better Exposed Filters configured to autosubmit.
This sounds like it could be a can of worms. Possibly a good candidate to split into another issue so we don't hold up the basic functionality here. Implementers can use the language string override feature in the meantime.