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

[a11y]: The 'id' "downshift-:r2:-label" specified for the ARIA property 'aria-labelledby' value is not valid #17567

Closed
2 tasks done
Chinmaya-812 opened this issue Sep 25, 2024 · 4 comments
Assignees

Comments

@Chinmaya-812
Copy link

Package

@carbon/react

Browser

Chrome

Operating System

MacOS

Package version

^1.40.0

React version

^18.2.0

Automated testing tool and ruleset

IBM Equal Access Accessibility Checker - Latest Deployment

Assistive technology

No response

Description

The 'id' "downshift-:r2:-label" specified for the ARIA property 'aria-labelledby' value is not valid

image

WCAG 2.1 Violation

No response

Reproduction/example

https://stackblitz.com/edit/github-cmfcow-9vyb8z?file=src%2FApp.jsx

Steps to reproduce

For the Dropdown of the file i got this Violation
The 'id' "downshift-:r2:-label" specified for the ARIA property 'aria-labelledby' value is not valid.

Suggested Severity

Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.

Code of Conduct

@philljenkins
Copy link

philljenkins commented Oct 4, 2024

Is this Accessibility Checker rule correctly flagging this issue in Carbon? yes, I think so.

aria_id_unique: The ARIA property must reference a non-empty unique id of an existing element that is visible
Violation
The 'id' "{0}" specified for the ARIA property '{1}' value is not valid

References - consider adding these references to the rule Help above:

The Checker is flagging that the id downshift-:r2:-label is not "unique", although the value is "valid" in HTML5 because there are very few restrictions, such as the value cannot contain any spaces.

Looking at the stackblitz example code above:

  1. I do not find that id downshift-:r2:-label anywhere
  2. I do see one label id downshift-:r5:-label, but since there is only one "r5" label the Checker does not flag an issue when run against the stackblitz example code.
  • Confirm that the real page flagging the issue doesn't have more than one "Dropdown label" with the same ID that is causing the issue from the rule aria_id_unique. It's OK (but not best practice) to have the same text label, but it's a violation to have duplicate (the same) IDs on a page.

@philljenkins
Copy link

philljenkins commented Oct 7, 2024

A recommended "to do" before closing this issue:

  1. Add a bullet to "Ensure the ID of the referenced label, such as "Access role" in the code example, is unique when there are multiple dropdown components on a page.

Development considerations

Keep these considerations in mind if you are modifying Carbon or creating a custom component.

  • The dropdown and multiselect variant ...
  • [new bullet] Ensure the ID of the referenced label is unique when there are multiple dropdown components on a page.

@tay1orjones tay1orjones added severity: 2 https://ibm.biz/carbon-severity and removed severity: 3 https://ibm.biz/carbon-severity labels Oct 15, 2024
@guidari guidari self-assigned this Oct 23, 2024
@guidari
Copy link
Contributor

guidari commented Oct 25, 2024

@Chinmaya-812 I don't the issue in the lastest version (1.69.0). Can you confirm that?

@guidari
Copy link
Contributor

guidari commented Nov 5, 2024

I'm going to close the issue. If you can replicate the issue let me know, so I can re-open it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

5 participants