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

feat(action-popover): add aria-labelledby and aria-describedby props #7115

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

nuria1110
Copy link
Contributor

@nuria1110 nuria1110 commented Dec 5, 2024

fix #7107

Proposed behaviour

  • Add aria-labelledby and aria-describedby props to ActionPopover.
  • Ensure that aria attributes are set on ActionPopoverMenuButton when ariaAttributes are passed using renderButton prop.

Current behaviour

  • ActionPopover does not support aria-labelledby and aria-describedby attributes.
  • When ariaAttributes is passed to ActionPopoverMenuButton using the renderButton prop, the aria attributes are not set on the button.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

  • See new test story "With aria attributes"

edleeks87
edleeks87 previously approved these changes Dec 5, 2024
@@ -1825,7 +1851,7 @@ test("an error is thrown, with appropriate error message, if an invalid element
globalConsoleSpy.mockRestore();
});

test("an error is thrown, with appropriate error message, if a submenu has incorrecr children", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: good tidying up

@nuria1110 nuria1110 marked this pull request as ready for review December 10, 2024 13:15
@nuria1110 nuria1110 requested a review from a team as a code owner December 10, 2024 13:15
@nuria1110 nuria1110 merged commit 34f367f into master Dec 11, 2024
24 checks passed
@nuria1110 nuria1110 deleted the FE-7015 branch December 11, 2024 09:48
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 144.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

[ActionPopover] - Add aria-describedby support for menu button
5 participants