Skip to content

Input fields: option for always showing focus outlines (WCAG 2.2) #2904

@knoobie

Description

@knoobie

What is the problem?

If you focus a text field or any other field component with the mouse, only the label gets highlighted. If you focus a field with the keyboard the proper "outline" is applied. This behavior has to be present or configure-able for mouse-focusing as well.

WCAG Criteria: 2.4.7 Focus Visible (Level AA)

The current state violates it explicitly, because the highlighting of the default inputs is "turned of".

See Failure of Success Criterion 2.4.7 due to styling element outlines and borders in a way that removes or renders non-visible the visual focus indicator

This describes a failure condition that occurs when the user agent's default visual indication of keyboard focus is turned off or rendered non-visible by other styling on the page without providing an author-supplied visual focus indicator. Turning off the focus indicator instructs the user agent not to present the focus indicator. Other styling may make it difficult to see the focus indicator even though it is present, such as outlines that look the same as the focus outline, or thick borders that are the same color as the focus indicator so it cannot be seen against them.

Some could argue that the "blue" label is a visual focus indicator, but I don't think it's enough.

Browsers

  • Chrome
  • Firefox
  • Safari
  • Safari on iOS
  • Edge

Screen Readers

  • None
  • NVDA
  • JAWS
  • VoiceOver on MacOS
  • VoiceOver on iOS

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

March 2025 (24.7)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions