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: accordion: remove role presentation and add default aria-label on expand toggle button for a11y #887

Conversation

ysarvaiya-c-eightfold
Copy link
Contributor

@ysarvaiya-c-eightfold ysarvaiya-c-eightfold commented Sep 4, 2024

SUMMARY:

This change removes the role of presentation from expand toggle button and Added default aria-label on expand toggle button of accordion for resolving accessibility issue.

GITHUB ISSUE (Open Source Contributors)

JIRA TASK (Eightfold Employees Only):

https://eightfoldai.atlassian.net/browse/ENG-107391
https://eightfoldai.atlassian.net/browse/ENG-107372

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 run yarn storybook.
(http://localhost:2022/?path=/story/accordion--single)
Confirm that expand button in accordion component does not have role="presentation"
Confirm that expandButtonProps has default ariaLabel prop. and expand button has aria-label="Toggle accordion"
Confirm that in accessibility tab in control that it does not violate 'Buttons must have discernible text' rule.
Screenshot 2024-09-04 at 4 35 44 PM

@ysarvaiya-c-eightfold ysarvaiya-c-eightfold changed the title fix: accordian: remove role presentation and add default aria-label on expand toggle button for a11y fix: accordion: remove role presentation and add default aria-label on expand toggle button for a11y Sep 4, 2024
Copy link

codesandbox-ci bot commented Sep 4, 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
Copy link
Contributor

needs_sandbox:3

@ysarvaiya-c-eightfold ysarvaiya-c-eightfold merged commit 2fa3c0f into EightfoldAI:main Sep 6, 2024
3 of 4 checks passed
jhoward-eightfold added a commit that referenced this pull request Sep 9, 2024
…n expand toggle button for a11y (#887)

* fix: accordian: remove role presentation on expand button

* fix: accordian: add default ariaLabel on expand button

* fix: accordion: add aria label back to the expand button

---------

Co-authored-by: Jeff Howard <106610186+jhoward-eightfold@users.noreply.github.com>
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.

2 participants