dequelabs / dequelabs/axe-core
ElementInternals: update `getAccessibleRefs`
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
`commons.aria.getAccessibleRefs` is a function that creates a map of elements with ids to elements that use that id in an idref(s) attributes. So for example, if the DOM looks like this:
```html
```
The function would create a map that more or less looks like this:
```js
{
document: {
div: [button]
}
}
```
The function needs to be updated to be able to handle lookups for elements that are referenced by elementInternal idref properties. We also want to be add a new feature to support filtering the returned elements by a specific ARIA attribute / property (e.g. only returning a list of elements that reference using `aria-labelledby`.
Contributor guide
Research direction
Start at commons.aria.getAccessibleRefs and inspect how it builds references from ARIA idref(s) attributes. Update the lookup to include ElementInternals idref properties and support filtering by a specified ARIA attribute or property; done when both reference types and filtering are handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100