WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 2 weeks ago

#47156 new enhancement

Consider a way to clear the wp.a11y.speak() live regions

Reported by: afercia Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-screenshots wpcampus-report
Focuses: accessibility, javascript Cc:

Description

Splitting this out from the WPCamput/Tenon accessibility report, see https://github.com/WordPress/gutenberg/issues/15296. See also #47144.

When wp.a11y.speak() is used to make screen readers announce a message, it updates the content of the visually hidden ARIA live regions placed at the end of the page source.

In most of the cases this is not a problem but, when screen reader users continue to navigate the page content by arrowing, they may encounter again the text that was previously announced, because this text is perceived as normal content by assistive technologies.

Ideally, there should be a way to clear the ARIA live regions before users get to them by arrowing. This aw also the feedback from the WPCampus report:

clear the live region so that users who encounter it while manually reading do not hear it.

However, clearing the live regions shouldn't depend on a specific user action or scenario. It would require a more generic solution, preferably avoiding setTimeout() which seems to me a very fragile solution by its own nature.

This applies to the a11y JavaScript package as well.

Attachments (1)

live region at the end of the page source.jpg (118.7 KB) - added by afercia 6 weeks ago.

Download all attachments as: .zip

Change History (3)

#1 @afercia
6 weeks ago

In the screenshot above: the ARIA live region (notice the highlighted area in the bottom left corner) read out as normal page content after it has been populated by a previous speak() message.

#2 @afercia
2 weeks ago

  • Keywords wpcampus-report added
  • Milestone changed from Awaiting Review to 5.3
Note: See TracTickets for help on using tickets.