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 positive on label-content-name-mismatch rule #1635

Closed
devaradhanm opened this issue Jun 14, 2019 · 7 comments
Closed

false positive on label-content-name-mismatch rule #1635

devaradhanm opened this issue Jun 14, 2019 · 7 comments
Assignees
Labels
docs Documentation changes fix Bug fixes rules Issue or false result from an axe-core rule support
Milestone

Comments

@devaradhanm
Copy link
Contributor

The rule seems to evaluate the innerText value & compares it with the aria-label value. This results in false positive, when we have icon as a child element that has some content, even though visually the user only sees icon instead of text.
eg where it fails:

<a id="link1" tabindex="0" href="./some-link" aria-label="Favorites">
  <div><span aria-hidden="true" class="some-icon"></span></div>
  <div><span aria-hidden="true">Favorites</span></div>
</a>

https://codepen.io/devaradhanm/pen/xoZdmd

including @iamrafan , for his inputs too.

@straker
Copy link
Contributor

straker commented Jun 18, 2019

I'm not very familiar with this rule so am not sure what the purpose of it is. The issue where it was proposed links out to a 404 page, so I'll have to get back to you on if this is a bug or works as intended.

@straker straker added the info needed More information or research is needed to continue label Jun 18, 2019
@dylanb
Copy link
Contributor

dylanb commented Jun 19, 2019

@straker the link in that issue is broken

@jeeyyy jeeyyy added fix Bug fixes and removed info needed More information or research is needed to continue labels Jun 20, 2019
@WilcoFiers
Copy link
Contributor

IMO we should include that icon character. Things that can't be pronounced should be ignored for the purpose of checking if things match.

@devaradhanm
Copy link
Contributor Author

@WilcoFiers , we also saw this issue in news.google.com. The left pane icons have readable text that gets rendered as icon.

image

image

@WilcoFiers WilcoFiers added support rules Issue or false result from an axe-core rule labels Jul 18, 2019
@WilcoFiers WilcoFiers modified the milestones: Attest-Ruby v3.4 Release, Axe-core 3.4 Jul 19, 2019
@straker straker removed their assignment Jul 26, 2019
@straker
Copy link
Contributor

straker commented Sep 24, 2019

With the help of @mfairchild365 we were able to determine that emoji/unicode inside of a control with aria-label set to the visible non-emoji/unicode will allow Dragon Naturally Speaking to activate the control. With that in mind, we'll fix the rule to take them into account.

@jeankaplansky
Copy link
Contributor

This goes in the release notes.

@chandana7393
Copy link

Tested, working as expected.
label_content_name_mismatch
Tested Environment:
Axe-coconut - 4.0.0.28804v
Axe chrome - 4.0.0.28714v
Axe-Firefox - 4.0.0.28714v
Chrome - 77.0.3865.120v
Firefox - 69.0.3 v
OS - Windows 10 64 bit.

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

No branches or pull requests

7 participants