Make WordPress Core

Opened 5 years ago

Last modified 42 hours ago

#47111 accepted defect (bug)

Dynamically added notifications need ARIA role alert or status

Reported by: afercia's profile afercia Owned by: joedolson's profile joedolson
Milestone: 6.6 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-testing-info
Focuses: ui, accessibility Cc:

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 (15)

#1 @afercia
5 years ago

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

#2 @afercia
5 years ago

Related: #47147.

#3 @NomNom99
2 years ago

  • Keywords needs-patch added

#4 @joedolson
7 months ago

  • Owner set to joedolson
  • Status changed from new to accepted

#5 @joedolson
7 months ago

  • Milestone changed from Future Release to 6.5

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


7 months ago

#7 @joedolson
7 months ago

This is a good thing to keep in mind while completing the work on #57791. Pinging @costdev to keep us both in the loop on that.

#8 @swissspidy
3 months ago

@joedolson Is this on your radar still for 6.5? Looks like a punt candidate given the lack of activity.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


3 months ago

#10 @joedolson
3 months ago

  • Milestone changed from 6.5 to 6.6

Still on my radar, but not going to happen this cycle.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


2 weeks ago

This ticket was mentioned in PR #6639 on WordPress/wordpress-develop by @cyrus11.


3 days ago
#12

  • Keywords has-patch added; needs-patch removed

Fixes : ticket/47111

##Summary

Add role as alert on containers showing any type of dynamically added notifications error/success/informational notice (specifically on javascript files).

This ticket was mentioned in PR #6640 on WordPress/wordpress-develop by @cyrus11.


3 days ago
#13

Fixes : ticket/47111

## Summary

Add role as alert on containers showing any type of dynamically added notifications error/success/informational notice (specifically on javascript files).

#14 @joedolson
42 hours ago

  • Keywords needs-testing-info added

Thanks, @cyrus11! The attached PR is a great start; the biggest gap is that it's going to need some testing instructions so that contributors can properly tested the patch. I checked the changes to user-profile.js, which apply to the password reset option on the user profile page. But some of the other changes would really benefit from testing instructions.

The code changes themselves look good and straightforward.

@joedolson commented on PR #6640:


42 hours ago
#15

Added some additional instances I found while reviewing this. Please see the comments on the ticket, as well; this is going to need some testing instructions. Thank you!

Note: See TracTickets for help on using tickets.