Skip to content

Accessibility fixes. #797

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Accessibility fixes. #797

wants to merge 1 commit into from

Conversation

pasitiis
Copy link

I made some changes to how the plugin works with the screen reader.

Enable page browsing with a screen reader when the disablePageInteraction setting is set to false, ensuring consistent behavior with or without a screen reader. The implementation has taken some inspiration from the cookie consent on the gov.uk website.

  • When disablePageInteraction is false, the role is set to "region." Browsing the page is possible with or without a screen reader.
  • When disablePageInteraction is true, the role is set to "dialog." Browsing the page is not possible with or without a screen reader.

Fixed focus shifting in the consentModal and PreferencesModal.

  • The focus shifted multiple times to the consentModal, causing issues for some screen readers. Fixed.
  • PreferencesModal focus is set to the title when the dialog is opened. Focusing on an empty div element added additional noise for some screen readers. Fixed.

Hide svg icon on screen reader.

Tested with VO + Safari / Chrome / Firefox, NVDA + Chrome/Firefox , JAWS + Chrome/Firefox

Copy link

vercel bot commented Jul 29, 2025

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
cookieconsent-docs ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2025 7:02am

Copy link

netlify bot commented Jul 29, 2025

Deploy Preview for cookieconsentv3-playground canceled.

Name Link
🔨 Latest commit 57ee1f0
🔍 Latest deploy log https://app.netlify.com/projects/cookieconsentv3-playground/deploys/688871eb2158da0008f5e493

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.

1 participant