link outline invisible when text color matches container background
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
Accessibility Severity | s2 |
People
(Reporter: nathanielpalmer, Unassigned)
Details
(Keywords: access)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Steps to reproduce:
Created a link with a background color and contrasting white text color as part of styles that apply the same appearance to links and buttons. See this codepen for a live example: https://codepen.io/diminutivesloop/pen/XWKOxLd
Actual results:
When the link is placed on a white or other light-colored background the focus outline is invisible. This is inconsistent with the default outline style for buttons which dynamically adjusts the outline color to contrast with the background.
Expected results:
The default outline styles for links should match those for buttons so that developers don't inadvertently create links that are inaccessible to keyboard users.
Comment 1•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•4 years ago
|
||
The reason why button
and a
are different are because of this chunk of code. That is, button
is using outline-style: auto
by default, while other elements just use a dotted
outline, using the initial outline color, which is currentColor
, and thus white in this case.
So it's not clear to me what's the best course of action here. It seems WebKit / Blink use outline-style: auto
for all focusrings by default... We could try to do that, I guess.
Comment 3•4 years ago
|
||
But using outline-style: auto feels wrong, and doesn't help when the auto-style color is the color of the background...
And since auto-style outlines depend on the platform it's yet another issue that's hard to test for developers across platforms, which would be a bit annoying.
Comment 4•4 years ago
|
||
The severity field is not set for this bug.
:jwatt, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 5•3 years ago
|
||
The severity field for this bug is set to S3. However, the accessibility severity is higher, [access-s2].
:emilio, could you consider increasing the severity?
For more information, please visit auto_nag documentation.
Comment 6•3 years ago
|
||
Bug 1759602 enabled outline-style: auto everywhere by default. Other bugs track further improvements. That outline color can be customized via accent-color
.
Updated•1 year ago
|
Description
•