dequelabs / dequelabs/axe-core

label: should check ariaLabelledByElements as well

Open
#4,943 2 comments 1 reaction 0 assignees View on GitHub
core fix rules
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 23h
Merged PRs (30d)
17

Description

### Product

axe-core

### Product Version

4.10.3

### Latest Version

- [x] I have tested the issue with the latest version of the product

### Issue Description

#### Expectation
Get `ariaLabelledByElements` value if possible for label value as well.

#### Actual
Only get `aria-labelledby` attribute, and don't parse `ariaLabelledByElements` value.

#### How to Reproduce
```html

Test label

```
```javascript
document.querySelector('input').ariaLabelledByElements = [document.querySelector('p')];
```

#### Additional context
When using custom element with shadow dom, it's the only way to refer to outer element.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.