Closed micahgodbolt closed 2 weeks ago
Just as an addendum here, we also need to make sure iOS + bluetooth keyboard maintains focus outlines, since I think that's the line enabling that behavior now.
Also windows desktop SRs in scan mode/virtual cursor don't currently show focus outlines, even with that check. VoiceOver on macOS does rely on that check, though is somewhat less important since it has its own cursor outline & generally users are not encouraged to use the tab key.
My suggestion for how to proceed, based on BizChat wanting this fixed quickly as a ship-blocker would be:
buttons: 0
heuristic entirely for now. Maybe also the clientX/clientY/etc heuristic too, since at a quick glance that didn't seem to be catching any modern SRs.:focus-visible
as a focus selector in addition to the tabster data attribute (i.e. so the focus style shows if either the data attribute is present, or :focus-visible
matches) in @fluentui/react-tabster
The second one would help us have more robust focus styles in general, and get us out of the trap of trying to use heuristics to detect ATs. That way the data attribute is primarily a fallback for browsers that don't support focus-visible
yet
fixed #80
In iOS, if
isNavigatingWithKeyboard
is set to true via attached keyboard or a focus event outside of the_isMouseUsedTimer
, then_onMouseDown
will not setisNavigatingWithKeyboard
back to false because it will get caught in the following return exception:https://github.com/microsoft/keyborg/blob/main/src/Keyborg.ts#L164
Turns out that Android and Windows touch events mimic mouse events and pass a
buttons
of 1, but iOS touch events have abuttons
value of 0, which causes the touch to be treated like a screen reader event.