Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#54681 closed defect (bug) (reported-upstream)

autocomplete.js and tooltip.js are missing aria-atomic=true

Reported by: russelleck's profile russelleck Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.8.2
Component: External Libraries Keywords:
Focuses: accessibility, javascript Cc:


An error container class="ui-helper-hidden-accessible" is made with aria-live="assertive", but it does not contain a WAI-ARIA attribute that will make sure all assistive technologies can read the error message after more than one invalid submission.

Adding the aria-atomic="true" to the error container tag will ensure assistive technologies can read the message after more than one invalid submission.

wp-includes/js/jquery/ui/autocomplete.js - line 313
wp-includes/js/jquery/ui/tooltip.js - line 109

Change History (6)

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

2 years ago

#2 @sabernhardt
2 years ago

  • Component changed from General to External Libraries

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

2 years ago

#4 @alexstine
2 years ago

  • Keywords good-first-bug added

#5 @afercia
2 years ago

  • Keywords needs-patch good-first-bug removed

Worth noting these two files are part of jQuery UI, which is an external library. Any change to these files would be lost the next time jQuery UI gets updated in core. Change requests should be reported upstream.

That said, I'm not sure an aria-atomic attribute is the only change that should be made.

  • tooltip.js: to my knowledge, it's not used in core.
  • autocomplete.js: it uses a role="status". which has an implicit aria-atomic value of true. It also uses an aria-live="assertive" attribute which overrides the default polite value of the role="status". At this point, it would be better to make it a role="alert" and omit the other attributes.

Seems to me the current jQuery UI implementation shows a bit its age. Some years ago the alert and status roles weren't fully supported. At that time, it was pretty common to build aria-live regions by setting the (implicit) attributes explicitly. Today, support has improved and it would be better to use some more modern code. Anyways, this issue should be reported to the jQuery UI team consideration.

For reference, in trunk these two files are located at:

#6 @sabernhardt
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Thanks for creating a report!

I moved it to the jQuery UI repo issue #2088 so the discussion can continue there.

Note: See TracTickets for help on using tickets.