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

figure element content should not be ignored for discernible text of links #835

Closed
dylanb opened this issue Apr 6, 2018 · 3 comments
Closed
Labels
fix Bug fixes rules Issue or false result from an axe-core rule

Comments

@dylanb
Copy link
Contributor

dylanb commented Apr 6, 2018

The following markup works in VO on OS X, I believe it will work everywhere. The accessible name is "Leader" and this shows up as a false positive in the aXe Chrome extension

<!doctype html>
<html lang="en-us">
  <head>
    <title>title attribute</title>
  </head>
  <body>
    <a href="javascript:;">
      <figure>
        <img src="./thing.jpg" alt="Leader">
      </figure>
    </a>
  </body>
</html>
@dylanb dylanb added fix Bug fixes rules Issue or false result from an axe-core rule labels Apr 6, 2018
@mfairchild365
Copy link
Contributor

If I had to venture a guess, this is due to the HTML-AAM standard. It states that the alt attribute should be ignored when computing the accessible name for the <figure> element. Instead, the accessible name should come from the <figcaption>.

For example, the same <figure> element does not have an accessible name in VoiceOver when it isn't wrapped by a link.

@dylanb
Copy link
Contributor Author

dylanb commented Apr 17, 2018

Yep...but the use of the alt seems to be accessibility supported, so we need to allow it

@mfairchild365
Copy link
Contributor

Fair enough. As AT aligns with the standards, would it be fair to assume that they would stop supporting the alt attribute for this case? If so, would be be good to surface a notice that suggests a better, more robust and future proof way of accomplishing this?

@WilcoFiers WilcoFiers changed the title false positive: links must have discernable text figure element content should not be ignored for discernible text of links Apr 30, 2018
mrtnvh pushed a commit to mrtnvh/axe-core that referenced this issue Nov 24, 2023
Co-authored-by: michael-siek <[email protected]>
Co-authored-by: michael-siek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

2 participants