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: allow title on button-name #794

Merged
merged 1 commit into from
Mar 28, 2018
Merged

fix: allow title on button-name #794

merged 1 commit into from
Mar 28, 2018

Conversation

marcysutton
Copy link
Contributor

This change makes it more clear that title is allowed for accessible naming of button elements and button inputs.

Closes #747
Closes #765

@iamrafan
Copy link
Contributor

@marcysutton title is already being allowed as an accessible name for <button> elements. #765 is more about the fix messages conveying that only title can be used as an accessible label when button-name rule fails on <button> elements for not having any accessible label

@marcysutton
Copy link
Contributor Author

marcysutton commented Mar 21, 2018

The change in this PR explicitly adds the non-empty-title check so it will expose title as a method to fix. Here is the failureSummary with this change, you can see the new bit at the end:

"Fix all of the following:
  Element is in tab order and does not have accessible text

Fix any of the following:
  Element has a value attribute and the value attribute is empty
  Element has no value attribute or the value attribute is empty
  Element does not have inner text that is visible to screen readers
  aria-label attribute does not exist or is empty
  aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty or not visible
  Element's default semantics were not overridden with role="presentation"
  Element's default semantics were not overridden with role="none"
  Element has no title attribute or the title attribute is empty"```

@iamrafan
Copy link
Contributor

sure, thanks for the clarification.

@WilcoFiers WilcoFiers merged commit e31fe9a into develop Mar 28, 2018
@WilcoFiers WilcoFiers deleted the button-name-fixes branch March 28, 2018 16:55
mrtnvh pushed a commit to mrtnvh/axe-core that referenced this pull request Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants