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

fix negative tabindex handling when determining focusability #2919

Merged

Conversation

AHBruns
Copy link
Contributor

@AHBruns AHBruns commented Nov 15, 2023

This PR solves this issue. Basically, it seems the code was taking tabindex to mean something it doesn't. Negative tabindexes are programatically focusable, and they should be treated as such by isFocusable.

There's a secondary issue here which is that this code also seems to be considering all elements with positive tabindexes interactive, which is not what a positive tabindex means. I've chosen not to change that as it is outside the scope of my original issue, but I do think the el.tabIndex > 0 check should be removed as it is, in my opinion, a bug.

@chrismccord chrismccord merged commit c0e09df into phoenixframework:main Dec 18, 2023
4 checks passed
@chrismccord
Copy link
Member

❤️❤️❤️🐥🔥

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.

2 participants