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

[2.x] Exclude hidden inputs from focusable elements #757

Merged
merged 1 commit into from
Apr 15, 2021
Merged

[2.x] Exclude hidden inputs from focusable elements #757

merged 1 commit into from
Apr 15, 2021

Conversation

bjuppa
Copy link
Contributor

@bjuppa bjuppa commented Apr 15, 2021

Currently if there is any <input type="hidden"> inside the modal, tabbing stops when that element is next.

This PR excludes such hidden inputs via the query-selector, so that focus progression is no longer stopped.
I couldn't find any existing tests for the modal or its tabbing in this repo, so I haven't updated or added any tests.

@driesvints driesvints changed the title Exclude hidden inputs from focusable elements [2.x] Exclude hidden inputs from focusable elements Apr 15, 2021
@bjuppa
Copy link
Contributor Author

bjuppa commented Apr 15, 2021

When investigating this I've come across other situations where certain elements may break the tabbing, for example with the hidden attribute on an otherwise interactive element or any of its ancestors. But solving that probably requires a rewrite of the current tab-progression code, checking programatically that the desired element has actually received focus before calling it a day.

It's clearly outside the scope of this PR, let me know if you want me to open an issue and propose a solution?

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.

None yet

2 participants