ARIA attributes in autocomplete and tooltip
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
From the report on WordPress Trac #54681
Russell Eck:
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.
@afercia:
I'm not sure an
aria-atomicattribute is the only change that should be made.
- autocomplete.js: it uses a
role="status". which has an implicit aria-atomic value of true. It also uses anaria-live="assertive"attribute which overrides the defaultpolitevalue of therole="status". At this point, it would be better to make it arole="alert"and omit the other attributes.Seems to me the current jQuery UI implementation shows a bit its age. Some years ago the
alertandstatusroles 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.
https://github.com/jquery/jquery-ui/blob/e21a2543b55680f23aaa7efa38f3288b8e767e7d/ui/widgets/autocomplete.js#L308-L315
https://github.com/jquery/jquery-ui/blob/e21a2543b55680f23aaa7efa38f3288b8e767e7d/ui/widgets/tooltip.js#L108-L116
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the cited sections of ui/widgets/autocomplete.js and ui/widgets/tooltip.js, then inspect their existing widget tests. Confirm the intended ARIA semantics for the live regions and error announcements, and consider the work done when repeated submissions and autocomplete announcements are correctly exposed to assistive technologies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100