Skip to content

Lighthouse warning: Buttons do not have an accessible name #866

Closed

Activity

  1. web-padawan commented on Jul 5, 2018

    @web-padawan
    Member

    Apparently, latest Lighthouse beta changed the a11y audit and there are new warnings. We need to check other components too.

  2. abdonrd commented on Jul 5, 2018

    @abdonrd
    ContributorAuthor

    @web-padawan thanks! Anyway, I have used the stable Lighthouse v3.0.0.

  3. web-padawan commented on Jul 5, 2018

    @web-padawan
    Member

    Confirmed this warning with the Lighthouse 3.0.1 (available as a Chrome extension)
    Note that Chrome builtin audit in DevTools still uses 2.9.1

  4. abdonrd commented on Jul 31, 2018

    @abdonrd
    ContributorAuthor

    Any news here? Thanks in advance!

  5. aarondrabeck commented on Sep 14, 2018

    @aarondrabeck

    +1

  6. removed their assignment
    on Oct 14, 2018
  7. aarondrabeck commented on Nov 28, 2018

    @aarondrabeck

    +1

  8. Haprog commented on Apr 10, 2019

    @Haprog
    Contributor

    Reopening this, as the previous fix had to be reverted (c451eaa) to fix a performance regression (#128)

  9. reopened this on Apr 10, 2019
  10. chrisgo67 commented on Sep 26, 2019

    @chrisgo67

    Any news on this?
    What is the status with Vaadin 14 components?

  11. 1 remaining item

  12. web-padawan commented on Jan 29, 2020

    @web-padawan
    Member

    I tested this with axe and it reports following accessibility violations:

    ---
    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
    
    ---
    Rule: button-name
    Impact: critical
    Buttons must have discernible text (https://dequeuniversity.com/rules/axe/3.4/button-name?application=axeAPI)
    
    Issue target: vaadin-drawer-toggle
    Context: <vaadin-drawer-toggle tabindex="0" role="button"></vaadin-drawer-toggle>
    Fix any of the following:
      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
      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
    ---

    When trying to use aria-hidden there is another error:

    Accessibility Violations
    ---
    Rule: aria-hidden-focus
    Impact: serious
    ARIA hidden element must not contain focusable elements (https://dequeuniversity.com/rules/axe/3.4/aria-hidden-focus?application=axeAPI)
    
    Issue target: vaadin-drawer-toggle,button
    Context: <button type="button" aria-hidden="true" tabindex="0"></button>
    Fix all of the following:
      Focusable content should be disabled or be removed from the DOM

    Regardless of that, VoiceOver on Safari properly handles role="button" on the host element (which is vaadin-drawer-toggle or vaadin-button - both use the same structure).

  13. web-padawan commented on Jan 29, 2020

    @web-padawan
    Member

    Note: the original decision to use this roles structure was done 2 years ago:

    See the comments

    I have tried to revert role="presentation" and tested it with VoiceOver on Mac OS Mojave:

    • Chrome: "button, group. you are currently on a button"
    • Safari: "you are currently on a button inside web content"

    When adding aria-label="toggle" to the drawer toggle, Chrome works correctly.

  14. web-padawan commented on Mar 9, 2020

    @web-padawan
    Member
  15. anezthes commented on Apr 3, 2020

    @anezthes
    Contributor
  16. juuso-vaadin commented on Apr 6, 2021

    @juuso-vaadin
    Contributor

    Did some testing and buttons are announced as they should when using

    • Safari + VoiceOver

    Button label is not announced at all in

    • Chrome + VoiceOver
    • Chrome + NVDA
    • Firefox + NVDA
    • Chrome + Windows Narrator

    I don't have access to JAWS at the moment.

    Current workaround is to manually set the aria-label.
    In Flow this is done with
    button.getElement().setAttribute("aria-label", "Click me");

  17. web-padawan commented on Sep 19, 2021

    @web-padawan
    Member

    Closing as fixed by #2394. I have created a separate ticket for testing - see #2571.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions