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

button-name rule fails for <button> with linked <label> #4660

Closed
1 task done
RavenAlly opened this issue Dec 22, 2024 · 2 comments
Closed
1 task done

button-name rule fails for <button> with linked <label> #4660

RavenAlly opened this issue Dec 22, 2024 · 2 comments
Labels
info needed More information or research is needed to continue

Comments

@RavenAlly
Copy link

RavenAlly commented Dec 22, 2024

Product

axe-core

Product Version

No response

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Expectation

axe-core button-name test should pass a <button> with linked <label for> based on HTML standard https://html.spec.whatwg.org/multipage/forms.html#category-label

Actual

button-name rule fails for <button> with accessible name defined by linked <label>

How to Reproduce

Button has a linked label, Chrome DevTools shows defined accessible name, axe-core button-name rule fails:
https://codepen.io/a11yally/pen/dPbWxrv

Additional context

N/A

@RavenAlly RavenAlly added the ungroomed Ticket needs a maintainer to prioritize and label label Dec 22, 2024
@straker
Copy link
Contributor

straker commented Jan 8, 2025

Thanks for the issue. I believe this should have been fixed in version 4.10.1 which added support of <labels> giving buttons an accessible name. I tested the latest axe-core and it doesn't throw a button-name issue.

Are you seeing something different?

@straker straker added info needed More information or research is needed to continue and removed ungroomed Ticket needs a maintainer to prioritize and label labels Jan 8, 2025
@RavenAlly
Copy link
Author

Thanks @straker, I've checked and I was pointing at 4.9.1 instead of latest version. Retest on latest version passed. Sorry for the bother.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info needed More information or research is needed to continue
Projects
None yet
Development

No branches or pull requests

2 participants