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

TreeView: Remove aria-describedby when leading and trailing visuals do not exist #4457

Open
JelloBagel opened this issue Apr 2, 2024 · 2 comments
Labels
bug Something isn't working component: TreeView Issues related to the TreeView component react size: pebble

Comments

@JelloBagel
Copy link
Contributor

Description

We are using TreeView in the NestedListView and I came across this warning in the axe tests: ARIA attribute element ID does not exist on the page: aria-describedby=":r3: :r4:". The aria-describedby is set in the TreeView Primer component by the leading visual and the trailing visual. Because the NestedListView does not use the TreeView.LeadingVisual and TreeView.TrailingVisual, the ids do not exist on the page.

Steps to reproduce

  1. Go to Storybook Recipes > NestedListView > Example
  2. Open Accessibility tab in the Add Ons panel
  3. Click the Incomplete tab to view test warnings
  4. Notice "ARIA attributes must conform to valid values"

Version

v36.12.0

Browser

Chrome

@JelloBagel JelloBagel added the bug Something isn't working label Apr 2, 2024
@JelloBagel JelloBagel changed the title [TreeView] Remove aria-describedby when leading and trailing visuals do not exist TreeView: Remove aria-describedby when leading and trailing visuals do not exist Apr 2, 2024
@patrickhlauke
Copy link

Just going to mention that having aria-describedby pointing to a non-existent id (or even having the attribute, pointing to nothing, a la aria-describedby="") won't have an adverse effect as such, and is more of a "code quality" issue. Of course, if it's easy to avoid, then by all means you should go for fixing it.

@broccolinisoup broccolinisoup added size: pebble component: TreeView Issues related to the TreeView component labels Apr 8, 2024
@broccolinisoup
Copy link
Member

Thanks @JelloBagel for filing this issue. We agree it is better to fix it and It is in our backlog now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: TreeView Issues related to the TreeView component react size: pebble
Projects
None yet
Development

No branches or pull requests

3 participants