Product
axe-core
Description:
I think I may have found a false positive bug for the label-title-only rule when using a combination of aria-labelledby, aria-describedby and aria-hidden on the labelling element.
Reproduced and explained here: https://codepen.io/fymmot/full/XWgQJLw
(My purpose for using aria-labelledby and aria-hidden in this way is to avoid duplicate announcements of the label texts for screen reader users. In our particular use case, we are using multiple elements to construct the label, which causes multiple swipes or down arrow interactions to move past it for the user.)
Expectation:
I expect that I can label an <input type="radio"> using aria-labelledby and having aria-hidden set on the labelling element.
I also expect that I can use aria-describedby on the same <input>, without it triggering a label-title-only error in aXe.
Actual:
When using a combination of aria-labelledby, aria-hidden and aria-describedby, aXe throws a label-title-only error.
I also get the same error if using hidden instead of aria-hidden.
I can remove the error by removing the aria-describedby attribute but keeping aria-labelledby.
I can also fix the error by removing aria-hidden or hidden from the labelling element.
Motivation:
This behavior does not seem logical, or intended. I don't think the presence of aria-describedby should affect the label-title-only test, as long as the aria-labelledby is valid.
If the combination of aria-labelledby and aria-hidden is discouraged or disallowed, it should throw an error regardless of aria-describedby, which it does not
axe-core version: 4.3.3
axe devtools extension (MacOS Chrome) version: 4.17.1
Product
axe-core
Description:
I think I may have found a false positive bug for the label-title-only rule when using a combination of
aria-labelledby,aria-describedbyandaria-hiddenon the labelling element.Reproduced and explained here: https://codepen.io/fymmot/full/XWgQJLw
(My purpose for using aria-labelledby and aria-hidden in this way is to avoid duplicate announcements of the label texts for screen reader users. In our particular use case, we are using multiple elements to construct the label, which causes multiple swipes or down arrow interactions to move past it for the user.)
Expectation:
I expect that I can label an
<input type="radio">usingaria-labelledbyand havingaria-hiddenset on the labelling element.I also expect that I can use
aria-describedbyon the same<input>, without it triggering alabel-title-onlyerror in aXe.Actual:
When using a combination of
aria-labelledby,aria-hiddenandaria-describedby, aXe throws alabel-title-onlyerror.I also get the same error if using
hiddeninstead ofaria-hidden.I can remove the error by removing the
aria-describedbyattribute but keepingaria-labelledby.I can also fix the error by removing
aria-hiddenorhiddenfrom the labelling element.Motivation:
This behavior does not seem logical, or intended. I don't think the presence of aria-describedby should affect the label-title-only test, as long as the aria-labelledby is valid.
If the combination of aria-labelledby and aria-hidden is discouraged or disallowed, it should throw an error regardless of aria-describedby, which it does not