-
-
Notifications
You must be signed in to change notification settings - Fork 787
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
Focus is invisible in WHC #215
Comments
Radios have been fixed in 75bd54d. Now that Many libraries (including Shoelace) use I'll report back on this once I get that updated. |
Sure, that's cool. Re future testing: Chrome browser is now acceptable for testing WHC on Windows. It should, for the most part, function exactly as Edge browser :) |
Apologies for the delay. It looks like many of the WHC issues have been resolved by switching from border-radius to outline in beta.74. Here's the remaining list of things I've found that need to be addressed:
I'll be working through many of these today, so if anyone notices something that isn't on this list, please comment below! |
Keyboard-only users of Windows High Contrast mode (WHC) cannot determine their current focus position in most of the components. Radio controls (where focus and selection are usually a shared state) are entirely indistinguishable.
This is because WHC forces a small set of available colours, in order to make it easier to force a high contrast (even though users can create their own themes with any level of contrast if they wish). Changes in colour used to denote state are not visible: border-color, background-color etc used as the sole visual method of denoting a state (such as focus or selection) do not appear. Box-shadow also does not appear. Opacity changes do.
I threw together a page of my own that just has some random components, because that was easiest to test: https://stommepoes.nl/work/shoelace/shoelace_demo.html
Impact statement: all interactive elements must have a visible and obvious focus indicator, so that sighted keyboard users have a clear indication of which element has focus.
Note that it is more important that users' own OS-level settings work than that any particular web page happens to have a high-contrast theme. These are not available on most other websites, and do not affect application chrome (such as browser URL bars).
Solution
For most components, adding a single line to places where box-shadow and border-color is being changed will make focus visible:
outline: 2px dotted transparent;
This will not be visible to other users and works well in conjunction with components relying on box-shadow and colour changes.
For the SVGs in the radio controls, set the
<circle>
elements' opacity to 0 unless the radio is focussed/selected.The text was updated successfully, but these errors were encountered: