You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiCollapsibleNavBeta] Consider adding aria-hidden="true" to the icon button for screen reader UX #7353
Is your feature request related to a problem? Please describe.
The current refactor of EuiCollapsibleNavBeta ( #7337 ) makes tremendous improvements for visual and keyboard UX. I'd like to add on to that work and propose hiding accordions' icon button from screen readers to avoid two buttons in Form Controls menus with the same accessible names.
Describe the solution you'd like
The expand/collapse accordions in EuiCollapsibleNavBeta is composed of two EuiButton components as sibling elements. The second button has a tabindex="-1" to remove it from the tab order. I'd like to take this a step further and add aria-hidden="true" to this button to remove a duplicate announcement for screen reader users.
Additional context
All three screen readers (VoiceOver, NVDA, JAWS) announced each button twice in their respective Form Controls menu and when traversing using the virtual cursor.
👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.
@JasonStoltz could you elaborate on the complexities you mentioned? Do you remember any details?
As far as I know, setting aria-hidden on a duplicated icon button will make all of its children inaccessible to screen readers too.
Adding aria-hidden="true" to an element removes that element and all of its children from the accessibility tree. This can improve the experience for assistive technology users by hiding:
Purely decorative content, such as icons or images
Duplicated content, such as repeated text
Offscreen or collapsed content, such as menus
The presence of the aria-hidden attribute hides content from assistive technology but doesn't visually hide anything.
I checked the changes running screen readers (VoiceOver on Mac and NVDA on Windows):
✅ The icon button is marked as aria-hidden and hence not focusable/readable by screen readers.
✅ There is no more duplication of toggle elements.
✅ Both default keyboard navigation and screen reader browse mode navigation work as expected and provide expected information
Activity
JasonStoltz commentedon Nov 20, 2023
Estimating this as "Medium" because there may be complexities with other aria attributes nested in EUIIcon
github-actions commentedon May 19, 2024
👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.
[EuiCollapsibleNavBeta] Added aria-hidden=true to arrow button (elast…
[EuiCollapsibleNavBeta] Fixing pre push issue (elastic#7353)
[EuiCollapsibleNavBeta] Creating new snapshots for the pre push fix (e…
Adding changelog for issue elastic#7353
weronikaolejniczak commentedon Jan 16, 2025
@JasonStoltz could you elaborate on the complexities you mentioned? Do you remember any details?
As far as I know, setting
aria-hiddenon a duplicated icon button will make all of its children inaccessible to screen readers too.(source: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden)
mgadewoll commentedon Feb 7, 2025
I checked the changes running screen readers (VoiceOver on Mac and NVDA on Windows):
✅ The icon button is marked as
aria-hiddenand hence not focusable/readable by screen readers.✅ There is no more duplication of toggle elements.
✅ Both default keyboard navigation and screen reader browse mode navigation work as expected and provide expected information
VoiceOver
Screen.Recording.2025-02-07.at.13.49.08.mov
perceivable buttons before
perceivable buttons after
NVDA
Screen.Recording.2025-02-07.at.13.47.03.mov
perceivable buttons before
perceivable buttons after
[EuiCollapsibleNavBeta] Added aria-hidden=true to arrow button (elast…
[EuiCollapsibleNavBeta] Fixing pre push issue (elastic#7353)
[EuiCollapsibleNavBeta] Creating new snapshots for the pre push fix (e…
Adding changelog for issue elastic#7353