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

Component fails axe tests due to role="presentation" on button element #144

Closed
web-padawan opened this issue Mar 3, 2020 · 5 comments
Closed
Labels
a11y Accessibility issue next LitElement based version issue refactor Internal improvement requires new major This would be a breaking change Severity: Major

Comments

@web-padawan
Copy link
Member

Mentioned in #96 but is a separate problem, so I decided to extract from there.

Rule: aria-allowed-role
Impact: minor
ARIA role must be appropriate for the element (https://dequeuniversity.com/rules/axe/3.4/aria-allowed-role?application=axeAPI)

Issue target: vaadin-drawer-toggle,button
Context: <button type="button" role="presentation" tabindex="0"></button>
Fix any of the following:
  ARIA role presentation  is not allowed for given element

We tested Material Web Components demos and they don't use the role="button" on the host element. Need to test if that would work for us too.

@web-padawan web-padawan added a11y Accessibility issue needs research More information needed to estimate labels Mar 3, 2020
@web-padawan
Copy link
Member Author

Here is the current list of allowed elements that can use presentation role according to axe.

@web-padawan
Copy link
Member Author

@anezthes
Copy link

anezthes commented Apr 3, 2020

I tested the following HTML structure with great success in Chrome and Safari using VoiceOver:

<button>
  <span part="prefix"><slot name="prefix"></slot></span>
  <span><slot></slot></span>
  <span part="suffix"><slot name="suffix"></slot></span>
</button>

@web-padawan web-padawan added next LitElement based version issue refactor Internal improvement requires new major This would be a breaking change and removed needs research More information needed to estimate labels Apr 3, 2020
@rolfsmeds
Copy link

This seems to cause some screen readers to announce button labels twice or not at all.

@rolfsmeds
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility issue next LitElement based version issue refactor Internal improvement requires new major This would be a breaking change Severity: Major
Projects
None yet
Development

No branches or pull requests

3 participants