-
Notifications
You must be signed in to change notification settings - Fork 861
[EuiSelectableListItem] fix duplicated announcement for checked options #9028
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
base: main
Are you sure you want to change the base?
Conversation
| /** | ||
| * Optional CSS class(es) to apply to the outermost element of the component. | ||
| * This allows for custom styling or theming. | ||
| */ |
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.
Thanks for adding these JSDoc 🙌🏻
| css={cssStyles} | ||
| tabIndex={tabIndex} | ||
| role="img" | ||
| role={isAriaHidden ? undefined : 'img'} |
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.
🎉
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.
❌ NVDA + Firefox (duplicated announcement)
Kapture.2025-09-19.at.12.05.24.mp4
❌ NVDA + Chrome (duplicated announcement, label missing)
Kapture.2025-09-19.at.12.09.02.mp4
I checked how it works in production now as well:
NVDA + Firefox (duplicated label and "Checked" announcement, but label present and the screen reader only text is not duplicated)
Kapture.2025-09-19.at.12.13.04.mp4
The reported issues state that the label is repeated twice and the fact that it is "checked" is repeated twice. Now, the label is not repeated but the screen reader only text is.
I was testing this story.
Co-authored-by: Weronika Olejniczak <32842468+weronikaolejniczak@users.noreply.github.com>
|
@weronikaolejniczak moved to Draft, will retest |
💚 Build SucceededHistory
|
💔 Build Failed
Failed CI StepsHistory
|
Closes: elastic/kibana#219496
Closes: elastic/kibana#216048
Closes: elastic/kibana#219342
Closes: elastic/kibana#216157
Closes: elastic/kibana#217137
Closes: elastic/kibana#217456
Closes: elastic/kibana#218397
Closes: elastic/kibana#225240
Summary
This PR addresses an accessibility issue in the
EuiSelectableListItemcomponent where screen readers would announce checked options multiple times due to duplicated or misplaced screen reader text. The main changes include:aria-describedbyto each list item that references only the relevant screen reader description (previously set within the list item content).EuiScreenReaderOnlycomponent to accept a custom id prop, enabling proper linkage with accessibility attributes.EuiIconcomponent to correct an incorrect role attribute when aria-hidden is set to true.Impact to users
🟢 There are no updates required by consumers.
QA
General checklist
Added documentationProps have proper autodocs (using@defaultif default values are missing) and playground togglesChecked Code Sandbox works for any docs examplesIf applicable, added the breaking change issue label (and filled out the breaking change checklist)If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)