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

Able to focus an ostensibly inert input in Safari #124

Open
aaxelb opened this issue Jun 19, 2019 · 5 comments
Open

Able to focus an ostensibly inert input in Safari #124

aaxelb opened this issue Jun 19, 2019 · 5 comments

Comments

@aaxelb
Copy link

aaxelb commented Jun 19, 2019

Update: Most of this issue was just browsers being browsers (I didn't realize how much tab key behavior varies), but one real problem remains: In Safari, pressing tab can sometimes focus and allow interacting with elements that should be inert.

For example, on https://wicg.github.io/inert/demo/, clicking on the page and then pressing tab focuses an input that should be inert. I can send exactly one keypress to that input, but typing further has no effect.
inert-safari
(Safari 12.1.1 on MacOS 10.13)

@robdodson
Copy link
Collaborator

hm thanks for reporting this! @alice or I will try to look into it when we have a moment.

@alice
Copy link
Member

alice commented Jun 24, 2019

Aside from being able to focus a supposedly-inert element in Safari, do these browsers have the same behaviour without the inert polyfill present? It seems like these may be browser-specific focusing behaviours/bugs.

@aaxelb
Copy link
Author

aaxelb commented Jun 24, 2019

@alice Oh wow, you're absolutely right. Firefox was respecting a Mac OS setting and Safari... has its own opinion on the tab key.

So yes, the only issue here is allowing focus on a should-be-inert input in Safari. Sorry for wasting your time with the rest!

@alice
Copy link
Member

alice commented Jun 25, 2019

I wonder if Safari simply doesn't respect tabindex=-1.

I had a bit of a think a little while back about the logic behind their "opinions" on the tab key, and came to the conclusion that their defaults are optimised for fast form filling, rather than keyboard-only navigation (with the setting to switch to the latter).

@bkardell
Copy link
Collaborator

Safari's things are kind of complex, and on iOS even more so. A lot of that is being discussed in the whatwg focus meta-bug/linked issues, thankfully... Unfortunately I don't have a link to handy at the moment as I'm on my phone

@aaxelb aaxelb changed the title Keyboard navigation (with tab key) broken in Firefox & Safari Able to focus an ostensibly inert input in Safari Jun 25, 2019
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

No branches or pull requests

4 participants