Skip to content

fix(ui5-button): announce accessible name #11396

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

unazko
Copy link
Contributor

@unazko unazko commented Apr 23, 2025

Issue:

  • The badge wasn't announced at all when an accessible-name attribute is provided
    for the ui5-button. The reason behind this behaviour is that the screen reader doesn't
    read the inner text nodes of the root button node when the same has aria-label attribute.

Solution:

  • The proper badge description text is placed into the aria-label attribute of the root
    button element. As a result the screen reader won't rely on the inner text content
    for the announcements.
  • Additionally the design description is also moved into the aria-label attribute,
    in order to keep a proper announcement order.

Fixes: #11350

@unazko unazko marked this pull request as ready for review April 23, 2025 14:49
@unazko unazko requested a review from hinzzx April 25, 2025 07:38
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 this pull request may close these issues.

[ui5-button]: Badge content is ignored when accessible-name is used
1 participant