On 2023-11-05 21:53, Philipp Kern wrote: > Hi, > > On 27.09.23 16:37, Blair Noctis wrote: >> The autofocus attribute on the Package(s) field prevents keyboard navigating >> (i.e. Ctrl+←). Using tabindex=0 one can press tab once to focus on it while >> making keyboard navigating possible. > > How exactly does it break keyboard navigation and how would I reproduce it to > see what this fixes?
Uh, I may have to take it back. It seems to be a conflict of keyboard shortcuts on Mac only. The shortcut is actually Cmd+←, on Mac. The corresponding shortcut, for going back, is Alt+← on Linux/Windows, I substituted Cmd with Ctrl without verifying, knowing that's true for many cases. Then, Mac devices doesn't have a Home key, so it allows Cmd+← to act like it, i.e. to jump to the start of a line, but Linux/Windows have Home, so Alt+← has no need to multi-role. When a input field is focused, these two roles conflict, but only on Mac. > Is this an accessibility concern? Per [0] it looks like jumping to an element > is > considered somewhat hostile. But it's not clear to me if tabindex=0 preserves > the natural order of Tab on the page. > > Kind regards and thanks > Philipp Kern > > [0] > https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus Setting tabindex "breaks" tab order, but autofocus does too. It's not better or worse. At this point I can't really blame setting autofocus, or tell if this change is worth it. -- Sdrager, Blair Noctis
OpenPGP_signature.asc
Description: OpenPGP digital signature