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

fix: stop screenreaders from reading duplicate accordion toggle btns #867

Merged

Conversation

jhoward-eightfold
Copy link
Contributor

@jhoward-eightfold jhoward-eightfold commented Aug 7, 2024

SUMMARY:

This change takes the toggle button out of the tabIndex and gives it a presentation role, relying on the full header click area to provide keyboard support and focus for the accordion toggle. it also points to the header content as a describedBy so its read in addition to the generic button label. Both of these can be overwritten on a case-by-case basis.

GITHUB ISSUE (Open Source Contributors)

#866

JIRA TASK (Eightfold Employees Only):

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

  • pull branch down locally and start storybook (yarn storybook)
  • with screen reader on, use tab key to interact with accordion to observe improvements in behavior

Copy link

codesandbox-ci bot commented Aug 7, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@jhoward-eightfold jhoward-eightfold merged commit 436c589 into EightfoldAI:main Aug 8, 2024
3 of 4 checks passed
jhoward-eightfold added a commit that referenced this pull request Aug 8, 2024
…867)

* fix: prevent screen readers from accessing duplicate accordion toggle buttons
---------

Co-authored-by: Jeff Howard <>
jhoward-eightfold added a commit that referenced this pull request Aug 14, 2024
…le btns (#867)

* fix: prevent screen readers from accessing duplicate accordion toggle buttons
---------

Co-authored-by: Jeff Howard <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants