Suggest increasing visibility of default focus ring to improve usability/accessibility for keyboard users
Categories
(Firefox :: Disability Access, defect, P3)
Tracking
()
People
(Reporter: faulkner.steve, Unassigned)
References
Details
(Keywords: access)
Attachments
(2 files)
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Comment 5•9 years ago
|
||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Updated•7 years ago
|
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
Comment 18•6 years ago
|
||
Is this different from bug 251198? If so, how?
Comment 19•6 years ago
|
||
I believe the first step would be to just make sure the default focus ring meets a 3 to 1 color contrast requirement (based on WCAG 2.1 SC 1.4.11) against the default page background. Then, if a dev or designer changes either the focus ring color or the background color...that dev/designer is responsible.
Or better yet, go with an "oreo" 3 pixel wide focus ring (black 1 px line, white 1 px line, black 1 px line).
Comment 20•4 years ago
|
||
It seems to me that currently, there the generic focus ring (i.e. currently, dotted border) and then focus ring of native, unstyled elements (e.g. <button>
s, <select>
s, etc.).
Dotted border is often hard to see, and looks old in my opinion. I personally like the thick blue border with space around the element, found in e.g. about:preferences
and about:addons
. It doesn’t seem to work well for some websites were the outline is partly hidden by other elements, but for reference, here’s the CSS code for this (that you can try by using e.g. Stylus):
outline: 2px solid #0a84ff;
outline-offset: 2px;
In Chrome 83, the focus ring was changed (and it’s also what’s used on Edge, Opera and Vivaldi):
Previously, Chromium used a light single color outline to indicate the focused element. However, if the focused element happened to be on a similarly colored background, the ring would be difficult to perceive[.]
[…]
The new focus indicator uses a thick dark ring with a thin white outline, which should improve visibility on both light and dark backgrounds. This is an easy accessibility win that automatically improves the keyboarding experience on a number of sites without developers needing to write any new code.
https://blog.chromium.org/2020/03/updates-to-form-controls-and-focus.html
See also «More accessible controls» in https://blogs.windows.com/msedgedev/2019/10/15/form-controls-microsoft-edge-chromium/
I can’t find how they do the focus ring in CSS though, maybe it’s more involved than that.
Comment 21•2 years ago
|
||
Better than improving the indicator style, I'd like to suggest making the focus indicator a user-customizable feature that isn't exposed to page CSS. I.e., make it unaffected by page styles so it cannot be altered by the page author and is under the complete control of the user.
If that was done, the question of the default styling would be much less of a concern.
Comment 22•1 year ago
|
||
There were recently default focus outline changes that :Asa has championed - and I think now Firefox has the best indication across OS and browsers - it is a double outline that uses AccentColor
on Mac and Firefox Blue on Windows without any HCM, and on Windows with a High Contrast Mode on the colors are changed to CanvasText
that is partially transparent and SelectedItem
that is opaque.
Attached is the screenshot of the observations, the Windows HCM used was Night Sky, MacOS accent color set to purple on the test machine.
The current color contrast does provide sufficient color contrast for the white page background (default, color contrast is 5.6:1) as well as black backgrounds (color contrast is 3.7:1) and the focus indication is 2px or more in thickness by default, thus satisfies both WCAG 2.2 Level AAA Success Criterion 2.4.13 Focus Appearance and Level AA SC 1.4.11 Non-text Contrast.
Considering the changes in the default styles, I recommend to close this bug as resolved.
Updated•1 year ago
|
Description
•