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

[EuiCollapsibleNavBeta] Consider adding aria-hidden="true" to the icon button for screen reader UX #7353 #8236

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Kukki8
Copy link

@Kukki8 Kukki8 commented Dec 13, 2024

Summary

This PR provides:

  • An added aria-hidden={buttonIsInteractive ? 'true' : 'false'} tag to the accordion_trigger.tsx file, as advised in the issue description.

This PR doesn't contain:

  • Changes in UI

closes #7353

Implementation

ChangeInEUIProject

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
      • JAWS
      • NVDA
      • VoiceOver
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer 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)

@Kukki8 Kukki8 requested a review from a team as a code owner December 13, 2024 14:48
Copy link

cla-checker-service bot commented Dec 13, 2024

💚 CLA has been signed

Copy link

👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually?

@weronikaolejniczak weronikaolejniczak self-assigned this Jan 16, 2025
@weronikaolejniczak
Copy link
Contributor

@Kukki8 thank you so much for your contribution! I'll review your PR soon 💚

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kukki8 we can remove this file 😄 We only need the one that's named the same as the PR number: 8236.md.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weronikaolejniczak Got it! I'll remove it.

Comment on lines +1 to +7
- Added aria-hidden={buttonIsInteractive ? 'true' : 'false'} tag to the accordion_trigger.tsx file, as advised in the issue description.

**Accessibility**

- Improved the accessibility experience of the accordion buttons so screen readers do not detect it twice.

- Summary : aria-hidden={buttonIsInteractive ? 'true' : 'false'} was added to src/components/accordion/accordion_trigger/accordion_trigger.tsx in object EuiAccordionTrigger in const arrow.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The top block is reserved for features. You can read more about the file structure here.

We write all accessibility improvements in the "Accessibility" section. One improvement is a one bullet point.

Here's my suggestion:

Suggested change
- Added aria-hidden={buttonIsInteractive ? 'true' : 'false'} tag to the accordion_trigger.tsx file, as advised in the issue description.
**Accessibility**
- Improved the accessibility experience of the accordion buttons so screen readers do not detect it twice.
- Summary : aria-hidden={buttonIsInteractive ? 'true' : 'false'} was added to src/components/accordion/accordion_trigger/accordion_trigger.tsx in object EuiAccordionTrigger in const arrow.
**Accessibility**
- Improved the `EuiAccordionTrigger`'s screen reader UX. Passed `aria-hidden` to the `EuiAccordionArrow` to avoid duplicated announcements by screen readers.

Does this sound good to you @Kukki8? 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weronikaolejniczak Yes, sounds good!. I'm still learning, so I'm fully open to any suggestions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kukki8 this snapshot file is necessary for the packages/eui/src/components/collapsible_nav/collapsible_nav.test.tsx test suite, can you bring it back? 😄 You can easily do it with: yarn workspace @elastic/eui test-unit collapsible_nav.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weronikaolejniczak Sure, I'll try that! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EuiCollapsibleNavBeta] Consider adding aria-hidden="true" to the icon button for screen reader UX
2 participants