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]: Decide DOM location of modal #749

Open
robbertkooiman opened this issue Nov 4, 2024 · 1 comment
Open

[Feat]: Decide DOM location of modal #749

robbertkooiman opened this issue Nov 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@robbertkooiman
Copy link

Description

Screen readers will automatically focus the cookie consent modal, because of the tabindex: -1. I would like to configure where the modal is located in the DOM so that tab order is not changed. Currently, when I tab normally, the order is like this:

  • Begin
  • Skip all website content because of tab index
  • Cookie consent modal
  • End of site

Personally, I think having the modal take tab index is a good thing, but skipping the website is not. I would like to place the modal on the top of the DOM for this reason.

Proposed solution

  • Make the tabindex configurable
  • Make the DOM location configurable

Additional details

No response

@robbertkooiman robbertkooiman added enhancement New feature or request triage yet to be reviewed labels Nov 4, 2024
@orestbida orestbida removed the triage yet to be reviewed label Nov 4, 2024
@orestbida
Copy link
Owner

You can change the location via the root option.

You could create a div with id=xyz on the very top, and then set root=document.getElementById('xyz').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants