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

Hide overlay arrow to screen readers #2014

Closed
vlaraort opened this issue Jun 15, 2023 · 2 comments · Fixed by #2030
Closed

Hide overlay arrow to screen readers #2014

vlaraort opened this issue Jun 15, 2023 · 2 comments · Fixed by #2030

Comments

@vlaraort
Copy link
Contributor

Expected behavior

When I have a overlay component displayed with a visible arrow, the arrow should be hidden with a aria-hidden="true", property so it's not announced to the screen readers, as it does not gives any useful information to those users.

Actual Behavior

The arrow is announced as "image", without any label, which is incorrect

Additional context

A workaround is to use a extension of the desired component that makes use of the overlay, and wrap the arrow with the property, that way the arrow is not announced

export class FixArrowAriaTooltip extends LionTooltip {
  /**
   * Add an aria-hidden true property to the tooltip arrow, to hide
   * it to the screen readers
   * @override
   */
  /** @protected */
  _arrowNodeTemplate() {
    return html`<div aria-hidden="true">${super._arrowNodeTemplate()}</div>`;
  }
}

But IMO the best approach would be to add the hidden directly to the _arrowNodeTemplate. WDYT? Whould you accept a merge request?

@gerjanvangeest
Copy link
Member

Hi @vlaraort,
Sounds good to me, can you make a PR with this fix?

@vlaraort
Copy link
Contributor Author

vlaraort commented Jul 6, 2023

@gerjanvangeest done! It's fine for you?

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

Successfully merging a pull request may close this issue.

2 participants