navigate to any page of the survey with a form field
using only the keyboard to navigate, identify the field that has focus
What should happen: I can clearly identify the focused field.
What actually happens: For checkboxes, select menus, and text fields I cannot immediately identify the currently focused field. This is particularly tricky with checkboxes since the :focus-within on the wrapper indicates (for users who can perceive the color change) that my focus is on a checkbox, but not which checkbox.
More detail:
These styles remove the browser's default focus indicator and rely on a low contrast box shadow:
Image demonstration:
This image shows each of four different form field types with the site's own focus indicators (left side of image) and then shows the same field types with the CSS I proposed above (right column).
The most compelling difference is the "Visual impairments" checkbox, in my opinion.
Filling out State of CSS Survey 2023: https://survey.devographics.com/en-US/survey/state-of-css/2023/hfg5V70I2tPvW2i5wgy1V/13
To reproduce:
What should happen: I can clearly identify the focused field.
What actually happens: For checkboxes, select menus, and text fields I cannot immediately identify the currently focused field. This is particularly tricky with checkboxes since the
:focus-within
on the wrapper indicates (for users who can perceive the color change) that my focus is on a checkbox, but not which checkbox.More detail: These styles remove the browser's default focus indicator and rely on a low contrast box shadow:
In practice, that makes the color combination
#1C375A
on#212424
, which has a 1.3:1 contrast ratio.Potential fix: This block of CSS puts a yellow outline (
#ffff00
) on the fields (contrast ratio of 14.6:1):Platform: Firefox 114 / Windows 11
WCAG failure: This constitutes a WCAG SC 1.4.11 Non-text Contrast (Level AA) failure.
Image demonstration: This image shows each of four different form field types with the site's own focus indicators (left side of image) and then shows the same field types with the CSS I proposed above (right column).
The most compelling difference is the "Visual impairments" checkbox, in my opinion.