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

Update fix message for rule "button-name" on <button> elements #765

Closed
iamrafan opened this issue Mar 6, 2018 · 4 comments
Closed

Update fix message for rule "button-name" on <button> elements #765

iamrafan opened this issue Mar 6, 2018 · 4 comments
Labels

Comments

@iamrafan
Copy link
Contributor

iamrafan commented Mar 6, 2018

button-name rule passes for <button> element having only non-empty title attribute as an accessible label

Add the following message to Fix at least one (1) of these issues: list

Element has a title attribute and the title attribute is empty

Add the following message in How to fix the problem list for in the help page (https://dequeuniversity.com/rules/axe/2.6/button-name)

Non-empty title attribute

@WilcoFiers
Copy link
Contributor

I'm not sure I fully understand. Are you asking to allow titles as a way to pass button-name?

@iamrafan
Copy link
Contributor Author

iamrafan commented Mar 7, 2018

'button-name' rule already considers non-empty title attribute as an acc name for <button> elements.
But when a <button> fails button-name rule, the fix messages shown in the screenshots (below) do not include the ones I mentioned above
image

image

@WilcoFiers
Copy link
Contributor

Gotcha, ok so this is related to #747 and #767. The has-visible-text check doesn't do what its name implies it does, e.g. check that an element contains text. It computes the accessible name instead, which is why we're not testing for title separately.

@iamrafan
Copy link
Contributor Author

iamrafan commented Mar 8, 2018

I am saying the current tests are just fine but just that users don't know one of the possible fixes for button-name failure is to use non-empty title. If we update the fix messages in 'how to fix' and the help page, users will know this fix.

Bdw, it is not related to both #747 and #767

this is related to the <button> elements, the following example

<button class="toggle-button" title="Collapse" aria-expanded="true" style="left: 182px;">
    <span class="bowtie-icon bowtie-chevron-left"></span>
</button>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants