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

fix: Prefer button subtree over title attribute #811

Merged
merged 4 commits into from
Mar 1, 2022
Merged

Conversation

eps1lon
Copy link
Owner

@eps1lon eps1lon commented Feb 23, 2022

Closes #810

@eps1lon eps1lon added the bug Something isn't working label Feb 23, 2022
@changeset-bot
Copy link

changeset-bot bot commented Feb 23, 2022

🦋 Changeset detected

Latest commit: bdf6999

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
dom-accessibility-api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@eps1lon eps1lon marked this pull request as ready for review February 23, 2022 17:34
@@ -538,6 +538,18 @@ export function computeTextAlternative(
return "Submit Query";
}

if (hasAnyConcreteRoles(node, ["button"])) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<a href> elements have a similar requirement. I don't get the impression that that is addressed yet in this PR. See https://www.w3.org/TR/html-aam-1.0/#a-element-accessible-name-computation

Copy link
Owner Author

@eps1lon eps1lon Feb 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do in a follow-up. Happy to take PRs for further improvement

@eps1lon eps1lon merged commit 5b0f48e into main Mar 1, 2022
@eps1lon eps1lon deleted the fix/button-name-title branch March 1, 2022 07:26
@github-actions github-actions bot mentioned this pull request Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Title attribute should not supercede text contents in accessible name computation on certain elements
2 participants