Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False negative: 'group-labelledby' check in 'checkboxgroup' rule does not fail corner cases #1111

Closed
iamrafan opened this issue Aug 29, 2018 · 2 comments · Fixed by #1316
Closed
Assignees
Labels
feat New feature or enhancement fix Bug fixes rules Issue or false result from an axe-core rule support

Comments

@iamrafan
Copy link
Contributor

iamrafan commented Aug 29, 2018

Screen reader experience for the following corner cases is not as expected, hence the checkboxgroup rule should fail

  • Case-1: Ungrouped checkboxes with same name and each having aria-labelledby pointing to a common label

  • Case-2: Ungrouped checkboxes with explicit [label] and each having aria-labelledby pointing one of the checkbox labels

  • Case-3: Ungrouped checkboxes with implicit [label] and each having aria-labelledby pointing one of the checkbox labels

Link to live demo: https://codepen.io/iamrafan/pen/MqjwOz

AT test results:
image

axe-core version: 3.0.3
axe-Coconut version: 3.4.0-alpha.2
@iamrafan iamrafan changed the title False negative: 'group-labelledby' check in 'checkboxgroup' rule does not fail for a few corner cases False negative: 'group-labelledby' check in 'checkboxgroup' rule does not fail corner cases Aug 29, 2018
@jeeyyy
Copy link
Contributor

jeeyyy commented Aug 29, 2018

@iamrafan

Thanks for this. Will do some tests on the same & see what can be done to normalise the experience across screen readers.

Cheers for the code snippet.

@WilcoFiers WilcoFiers added feat New feature or enhancement rules Issue or false result from an axe-core rule support labels Sep 18, 2018
@WilcoFiers
Copy link
Contributor

Exploring this a little bit. I think the problem with group-labelledby is that it doesn't check if there is also a unique label. The following code shouldn't pass:

<input type="radio" name="foo" aria-labelledby="bar" />
<input type="radio" name="foo" aria-labelledby="bar" />
<p id="bar">Label</p>

As for the odd Firefox thingy, that's a known issue. Our accessible name computation algorithm takes that into consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or enhancement fix Bug fixes rules Issue or false result from an axe-core rule support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants