Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Consent Manager & Toggle a11y fixes#1030

Merged
RubenSandwich merged 12 commits into
mainfrom
rn/fix/consent-manager-a11y-fixes
Jun 20, 2024
Merged

Consent Manager & Toggle a11y fixes#1030
RubenSandwich merged 12 commits into
mainfrom
rn/fix/consent-manager-a11y-fixes

Conversation

@RubenSandwich

@RubenSandwich RubenSandwich commented Jun 11, 2024

Copy link
Copy Markdown
Contributor

🎟️ Asana Tasks

Description

Fix a variety of accessiblity issuies around the consent manager:

  • Toggles missing accessible names
  • see more/less button missing accessible name
  • allowing ESC to close the dialog
  • removing unneeded headers

Testing 🚀

  1. Load up dev-portal
  2. Update @hashicorp/react-consent-manager to this branch:
npm install 'https://gitpkg.now.sh/hashicorp/react-components/packages/consent-manager?rn/fix/consent-manager-a11y-fixes'
  1. Start dev-portal in an incognito window (so you can open the consent manager)
  2. Test the following
    1. esc closes the modal
    2. tab is "focus trapped" in the modal and will not exit it
    3. The more/less and toggle buttons now have accessible names
    4. The toggle button responds to both space and enter
    5. The modal no longer has any <header> tags within it

@vercel

vercel Bot commented Jun 11, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2024 6:30pm

@changeset-bot

changeset-bot Bot commented Jun 11, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bf4220c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@hashicorp/react-consent-manager Patch
@hashicorp/react-toggle Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@RubenSandwich RubenSandwich changed the title remove header tags, as there should be 1 per page consent manager a11y fixes Jun 14, 2024
@RubenSandwich RubenSandwich self-assigned this Jun 14, 2024
@RubenSandwich RubenSandwich marked this pull request as draft June 14, 2024 20:40
@RubenSandwich RubenSandwich changed the title consent manager a11y fixes Consent Manager a11y fixes Jun 14, 2024
@RubenSandwich RubenSandwich changed the title Consent Manager a11y fixes Consent Manager & Toggle a11y fixes Jun 14, 2024
@RubenSandwich RubenSandwich marked this pull request as ready for review June 18, 2024 18:10
}
aria-expanded={this.state.showCategories[name] ? `true` : `false`}
aria-controls={
this.state.showCategories[name] ? categoryListID : null

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

null because we only render the contents of the dropdown if the dropdown is open.

@RubenSandwich RubenSandwich requested review from a team and nandereck and removed request for a team June 18, 2024 18:50

@nandereck nandereck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - validation steps work perfectly and code looks good! 🏅

Comment thread packages/consent-manager/components/dialog.module.css
@RubenSandwich RubenSandwich merged commit b6bb971 into main Jun 20, 2024
@RubenSandwich RubenSandwich deleted the rn/fix/consent-manager-a11y-fixes branch June 20, 2024 17:10
@hashibot-web hashibot-web mentioned this pull request Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants