Skip to content

With forced-colors: active, focus-rings may be invisible #42062

@AWqxKAWERbXo

Description

@AWqxKAWERbXo

Prerequisites

Describe the issue

While classic hyperlinks remain visible:

buttons like this:

Image

will not:

Image

The reason: The focus-ring is not an outline (which will be set to 0) but a box-shadow.

.btn:focus-visible {
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
    box-shadow: var(--bs-btn-focus-box-shadow);
    color: var(--bs-btn-hover-color);
    outline: 0;
}

I think this should be, at least for forced-colors: active mode, an outline.

Reduced test cases

<a href="/" class="btn btn-primary">A default button</a>

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Microsoft Edge

What version of Bootstrap are you using?

v5.3.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions