WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 4 months ago

#47111 new defect (bug)

Dynamically added notifications need ARIA role alert or status

Reported by: afercia Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: ui, accessibility Cc:
PR Number:

Description

Follow up to #46995.

In the various admin screens, all the notifications / warnings and the like that are rendered "on the fly" and injected in the DOM need either an ARIA role alert or status to be properly perceived by assistive technologies and users using these technologies.

This doesn't apply to the standard "admin notices" that are normally rendered on page load. It only applies to JavaScript-rendered notices that appear at some point in a page. There are a few of them across the admin that would greatly benefit from a standardized component.

References:
https://www.w3.org/TR/wai-aria-1.1/#alert
https://www.w3.org/TR/wai-aria-1.1/#status

Quoting from the Aria Authoring Practices (emphasis mine):

Dynamically rendered alerts are automatically announced by most screen readers, and in some operating systems, they may trigger an alert sound. It is important to note that, at this time, screen readers do not inform users of alerts that are present on the page before page load completes.

W3C role=alert example:
https://www.w3.org/TR/wai-aria-practices/examples/alert/alert.html

Change History (2)

#1 @afercia
6 months ago

Related, as a good example of dynamically added notifications: #47147.

#2 @afercia
4 months ago

Related: #47147.

Note: See TracTickets for help on using tickets.