[wp-trac] [WordPress Trac] #46995: Notifications need ARIA `role` attribute of either `status` or `alert` for accessibility purposes

WordPress Trac noreply at wordpress.org
Sun Apr 28 14:54:24 UTC 2019


#46995: Notifications need ARIA `role` attribute of either `status` or `alert` for
accessibility purposes
----------------------------+------------------------------
 Reporter:  dannylonglegs   |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  5.1.1
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  accessibility
----------------------------+------------------------------

Comment (by afercia):

 @dannylonglegs thanks for your report. It's important to note that
 `role=status` and `role=alert` are a specialized type of live regions.
 That is to say that using these roles on notifications that are rendered
 on page load won't have any effect. Assistive technologies won't announce
 the notifications content.

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

 Quoting from the [https://www.w3.org/TR/wai-aria-practices/#alert 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

 The standard admin notices in WordPress are rendered during page load.
 They're usually placed close to the main H1 heading so, in a way, screen
 reader users can find them with some content exploration. Any suggestions
 to improve their discoverability after page load is very welcome. I guess
 there should be a standardized way to generate the notices to start with.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46995#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list