dequelabs / dequelabs/axe-core
Misleading issue text when a section element has an aria-labelledby attribute that references an empty element
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
### Product
axe-core
### Product Version
4.7.2
### Latest Version
- [X] I have tested the issue with the latest version of the product
### Issue Description
Given this HTML
```
content in section
```
axe returns a needs-review issue "Elements must only use allowed ARIA attributes." That issue states:
```
This potential issue needs your review...
aria-labelledby attribute is not well supported on a section with no valid role attribute.
```
And
```
To solve this problem, you need to fix the following:
aria-labelledby attribute is not well supported on a section with no valid role attribute.
```
However, this HTML does not return any issues:
```
Test heading
content in section
```
The only difference is that the second example's `aria-labelledby` reference has text content, while the first example does not. Thus, the issue appears to have more to do with the fact that the element referenced by `aria-labelledby` does not have any text. Something that is not obvious from the text of the issue that was raised.
Example can be found here: https://codepen.io/mfairchild365/pen/KKbdQov
Contributor guide
Assessment
This issue has not been assessed yet.