-
Notifications
You must be signed in to change notification settings - Fork 124
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
Update explainer heuristic. Consider ignoring meta, alt/option, control keys. #167
Comments
I think that example heuristic text looks good 👍 I can work on updating the Chrome native implementation and adding some WPTs. |
Assigning to myself to create CRBug for chrome impl. |
The option key on Mac doesn’t seem to be triggering keyboard mode. In Safari, there is a checkbox setting to “press tab to highlight each item on a web page (including links and all form items, instead of just text fields and pop ups (drop downs)). Using the option key reverts that behavior temporarily. If the checkbox is not checked, using the option key will temporarily make it act as though it is checked. Chrome on Mac has a similar setting. But using the option key in this way isn’t showing the focus ring the way it does without it. |
I was working on mui/material-ui#16976, by luck, the concern was already taking care of in WICG#167. In the process of applying the diff, I have found this strange call to clearTimeout—I believe it's not needed.
I was working on mui/material-ui#16976, by luck, the concern was already taking care of in #167. In the process of applying the diff, I have found this strange call to clearTimeout—I believe it's not needed.
To clarify: do you mean that the expected behaviour is that [option] + [tab] on Mac should behave identically to [tab] on its own, and currently it does not behave that way because we treat [option] + [tab] as though it might potentially be a system shortcut? |
Pretty sure that is indeed what @bradkemper is saying. I don't know what the solution is, Safari is so annoying. I ran into this today and it caused quite a bit of confusion/frustration for me. Sorry, I know this is an old issue, but it would be nice to see some solution or at least a note about it in the documentation. I did not expect the option key to cause the tab to be ignored. |
Yeah, it is more of a Mac thing than just Safari. The tabbing behavior on Macs is usually just text fields, and the browser setting is to switch that to tab to more things. Holding the option key down while tabbing temporarily causes the tabbing behavior NOT indicated by the setting. So option tabbing should be treated the same as normal tabbing for this heuristic. |
Current behavior
This is currently what's in the explainer example heuristic
The above snippet does not match the polyfill or the experimental implementation in Chrome—both of which turn on keyboard modality if focus was proceeded by any key press (including meta and modifier keys).
Proposed behavior
@alice and I were discussing if this behavior should be changed so any key would trigger keyboard modality unless the keypress included a meta key (⌘ Command / ⊞ Windows), option / alt key, or control key.
Modifier keys, like shift, would still trigger keyboard modality (for instance, shift + Tab).
The example heuristic text would be updated to something like:
TODOs
:focus-visible
impl. to match.:focus-visible
heuristic in CSS4 spec.@alice, please let me know if I'm mistaken about any of the above 😸
The text was updated successfully, but these errors were encountered: