[wp-trac] [WordPress Trac] #54681: autocomplete.js and tooltip.js are missing aria-atomic=true

WordPress Trac noreply at wordpress.org
Mon May 23 13:34:11 UTC 2022

#54681: autocomplete.js and tooltip.js are missing aria-atomic=true
 Reporter:  russelleck          |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  External Libraries  |     Version:  5.8.2
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  accessibility, javascript
Changes (by afercia):

 * keywords:  needs-patch good-first-bug =>


 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
 [https://www.w3.org/TR/wai-aria-1.2/#status 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

 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:

Ticket URL: <https://core.trac.wordpress.org/ticket/54681#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list