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

fix(atomic): Fix for the label_name_visible from the IBM a11y checker #5079

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marekxhtml
Copy link
Contributor

IBM Accessibility checker reports following violation "Accessible name does not match or contain the visible label text" due to mismatch between aria-label and what is inside the label tag, so numbers in both places needs to be exact the same.

OsV9upEXTp
VAWYebpHCv

@marekxhtml marekxhtml requested a review from a team as a code owner March 14, 2025 22:24
@louis-bompart louis-bompart added the enhancement New feature or request label Mar 18, 2025
@louis-bompart
Copy link
Collaborator

Thanks for this PR, @marekxhtml; before I finish triaging your PR, do you have an example of live usage where this is causing issues for end-users?

I did take note of WCAG, and from my current understanding, I'm leaning towards rejecting your PR: Indeed, my concern is that this will increase the likelihood of the screenreader misspeaking large numbers in the label (e.g. when the browser locale mismatches the system/screenreader locale).

@louis-bompart louis-bompart added the question Further information is requested label Mar 18, 2025
@marekxhtml
Copy link
Contributor Author

@louis-bompart It is not correct to have a visible number formatted with commas (e.g., "1,200") while using an unformatted number (e.g., "1200") in the aria-label. This inconsistency violates WCAG 2.2 Success Criterion 2.5.3: Label in Name, which requires that the accessible name contains the same text as the visible label.

Some screen readers interpret "1200" as "twelve hundred", while "1,200" is typically read as "one thousand two hundred."
This inconsistency can lead to confusion for users relying on auditory output.

Success Criterion 2.5.3: Label in Name states:
"The intent of this Success Criterion is to ensure that the words which visually label a component are also the words associated with the component programmatically. This helps ensure that people with disabilities can rely on visible labels as a means to interact with the components."
(Source: WCAG 2.2)

To avoid such confusion "count" variable is used in both places. For the visible label and for the aria-label.

@louis-bompart
Copy link
Collaborator

Thanks for your insight @marekxhtml; it's much appreciated :)
I created a work item on our end so that we can investigate this in-depth; we'll get back to you in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants