-
Notifications
You must be signed in to change notification settings - Fork 538
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(Treevieew):do not add aria-describedby attribute when empty leading/trailing visual #5196
Conversation
…ng/trailing visual
🦋 Changeset detectedLatest commit: 03a0e08 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/349374 |
🟢 golden-jobs completed with status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool 👍
Closes #4457
Currently a leadingVisualId and TrailingVisualId are generated and attached to the TreeItem's
aria-describedby
attribute regardless of whether these nodes are supplied to the component or not. This PR refactors the aria-describedby logic in to only addaria-describedby
when the nodes (for trailing and leading visuals) are actually present, and mark it as undefined otherwise.Changelog
New
Changed
aria-describedby
is only added to TreeItem's when at least one of leading/trailing visual is present and only the present ID(s) is added.Rollout strategy
Testing & Reviewing
Load deployed treeview stories and ensure TreeItem's aria-describedby only contains the Id(s) of the present leading/trailing visual in the various stories.
Merge checklist