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

  1. Create view through UI with exposed filters
  2. Enable AJAX on view
  3. Vist view to test filter and interact with exposed filter
  4. On submit no notification is provided for screen readers

Proposed resolution

Provide by default aria-live notifications when views with exposed filters are updated.

  1. Ideally the page/content would only change when the submit button is clicked
  2. aria-live=”polite” is located on the <header> in the view to update screen readers
  3. aria-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

jldust created an issue. See original summary.

mgifford’s picture

Issue tags: +wcag413

I think this fits under WCAG SC 4.1.3.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

aaronbauman’s picture

Component: views_ui.module » views.module
Issue summary: View changes
Parent issue: » #3474266: [meta] Views ajax accesibility review

Using Announce seems like the way to go here, since that already defines an aria-live component.

Ideally the page/content would only change when the submit button is clicked

Pretty sure this is how exposed filters work, unless you have a contrib like Better Exposed Filters configured to autosubmit.

Provide an option for editors to modify or adjust the text within the aria-live notification.

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.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.