Skip to content

[EuiButton] [A11y] :focus-visible outline for Primary filled buttons barely visible #8953

@Zacqary

Description

@Zacqary

Describe the bug
When tabbing through EuiButtons, the :focus-visible outline is always blue, even if the button is also blue. This makes it very difficult to tell whether a button is actually in focus or not.

EDIT: The blue outline is only happening on Firefox. Chrome displays a black outline, but it looks like a less visible outline than intended. Manually triggering :focus-visible in the dev tools displays a far more visible black and white outline, but you can't get this outline to display using the Tab key. See screenshots.

Impact and severity

Very high for low-vision users. Honestly even pretty high for non-visually impaired users that happen to be using the keyboard.

Environment and versions

  • EUI version: 106.2.0
  • Browser: Firefox Developer Edition 142.0b3
  • Operating System: macOS

Minimum reproducible sandbox

This can be seen on the EUI Button demo page

To Reproduce

  1. Find an EUI button with color: primary, fill: true
  2. Use Tab to focus the button

Expected behavior
Button should be outlined in something like black, white, or another highly visible color. Manually setting :focus-visible in Chrome seems to display what was intended, but you can't actually trigger this state using the Tab key.

Screenshots

Firefox

Note in the video the contrast ratio also isn't great on Success buttons, but it's at least a bit easier to see

Screen.Recording.2025-08-07.at.12.52.10.PM.mov

Chrome

Here, the outline is at least black, but still difficult to see

chromefocus.mov

When I manually go into the inspector and select :focus-visible on the button element, it displays this instead:

Image

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions