Autocomplete widget should use bound item.label property as a fallback for empty aria-label.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
When li element in the dropdown list has an empty "aria-label" attribute current implementation fallbacks to using bound item.value for aria-label.
It'd be more logical using item.label for fallback instead.
Additionally this may lead to js exception when item.value is not of "string" type because in the next line it's passed to String.prototype.trim function that accepts only string arguments.
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 at ui/widgets/autocomplete.js lines 256-258, linked from the issue. Trace how an empty aria-label fallback is selected and how the value is processed. Done means the fallback uses item.label and does not raise an exception when item.value is not a string; add or update regression coverage for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100