Skip to content
easeweb
Search topics

Low-contrast form fields, checkboxes and icons

Field borders, checkbox boxes and icon buttons are drawn in colours too close to what is behind them: a pale grey on white, or white over a photo.

WCAG 2.2
SC 1.4.11AA· new in 2.1
Required by
EN 301 549 (EU)
Broken border: 1px solid #e0e0e0
The accessibility problem illustrated: Low vision:Where is the search box?
01

The problem

People with low vision can't find the search field, the filter checkbox or the carousel arrows

02

Try it

Find the search field, the In stock only checkbox and the photo’s arrows

  • Broken 1: the field’s border and the empty checkbox’s box are a pale grey on white. Can you see where to type, and that the filter can be ticked?

  • Broken 2: the arrows are white, straight on the photo. Can you see how to change the slide?

  • Apply the fix. The edges are darker, and the arrows sit on white discs.

Broken Can you fix this?

Maple & Thread
Linen tote, 1 of 3

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give each field edge, checkbox and icon 3:1 contrast

Before

Field and checkbox edges in a pale grey

:root {  --control-edge: #e0e0e0; /* 1.32:1 on white */}.search-input {  border: 1px solid var(--control-edge);  background: #fff;}.filter-check {  appearance: none;  width: 20px;  height: 20px;  border: 1px solid var(--control-edge);  border-radius: 4px;  background: #fff;}.filter-check:checked {  border-color: #1a1a1a;  background: #1a1a1a url("check.svg") center no-repeat;}.carousel-arrow {  color: #1a1a1a;  background: #fff;  border-radius: 50%;}
What is wrong2 points
  • The search field's border barely shows. The edge token, #e0e0e0, is only 1.32:1 on white, where a field's edge needs 3:1.
  • The empty checkbox is hard to see, and only a ticked one stands out. Its box takes the same token, so it is only 1.32:1 too, below the 3:1 it needs.
After
FixAn edge token that keeps 3:1, and a backing for icons over photos
:root {  --control-edge: #767676; /* 4.54:1 on white */}.search-input {  border: 1px solid var(--control-edge);  background: #fff;}.filter-check {  appearance: none;  width: 20px;  height: 20px;  border: 1px solid var(--control-edge);  border-radius: 4px;  background: #fff;}.filter-check:checked {  border-color: #1a1a1a;  background: #1a1a1a url("check.svg") center no-repeat;}.carousel-arrow {  color: #1a1a1a;  background: #fff;  border-radius: 50%;}@media (forced-colors: active) {  .carousel-arrow {    border: 1px solid ButtonText;  }}
How it is fixed3 steps
  1. Set the edge token to #767676, 4.54:1 on white. The search field's border and the empty checkbox's box both take it, so one change fixes both.
  2. Put each arrow on a solid white disc, with a dark chevron: 17.40:1 against the disc, on any photo.
  3. In forced colors, give the arrows a ButtonText border, so the disc still has an edge when its white fill is replaced.

This fixes both Befores and passes 1.4.11.

04

Design ideas

A control can be quiet and still be found

Six more ways to draw the store’s search field, its header icons and the arrows over its photos. Point at each one, click into the fields and Tab through them: three can be found at rest, and three only by someone who already knows where to look.

In the design file

  • Write the contrast ratio next to each field’s border or underline colour, at least 3:1 against the page.
  • Draw each checkbox empty as well as ticked, with the empty box’s ratio against the page written beside it, at least 3:1.
  • Put each icon that sits on a photo on a solid background shape, and check it on the lightest and the darkest photo the slideshow can show.
  • Draw the page in a Windows contrast theme, where the fields, checkboxes and icons must still show.

Passes

  • Soft fill with a dark underline A #f2f2f2 fill gives the field a calm block of colour, but at 1.12:1 against the page it can’t mark the field alone. The 2px #1a1a1a line under it does, at 17.40:1.
  • Maple & Thread
    A white pill on a dark header On the #1a1a1a header a plain white field needs no border: its fill is 17.40:1 against the header, the brightest thing in the bar.
  • Icons with no circle or border The #1a1a1a glyph alone marks each control, at 17.40:1 on white, so the header stays light. A #f2f2f2 disc appears on hover, and focus still gets its ring, since a control with no edge still needs a visible focus.

Fails

  • A soft fill and nothing elseWCAG 1.4.11 The #f2f2f2 fill with no edge is 1.12:1 against the page, and a field marked only by its fill needs 3:1. A 2px #1a1a1a line under it, or a #767676 edge at 4.54:1, keeps the same soft look.
  • Thin pale grey iconsWCAG 1.4.11 Thin #b3b3b3 icons look airy, but at 2.10:1 on white they miss the 3:1 an icon needs when it is the only sign of the control. A #1a1a1a glyph keeps the same thin line.
  • Linen tote
    Glassy arrows over the photoWCAG 1.4.11 A frosted circle of 35% white with a white chevron looks light over a dark photo, but the photo decides: over this one’s pale #dfceb8 the chevron is 1.31:1 against its circle, and the arrow is gone. A solid white circle with a #1a1a1a chevron, 17.40:1, keeps the round shape on any photo.
05

Verify the fix

5 checks, no mouse.

Test with: Contrast measurement, Zoom, Forced colors

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the theme tokens or shared component styles change.

Limits

This is a starting pattern, not a guarantee for every application. Colour values and token names are examples; measure your own palette on your real backgrounds. A contrast ratio is a minimum, not proof that a control is easy to find. What a contrast theme does to the same controls is covered in high contrast mode hiding focus, icons and selections. Check the complete pages with people who have low vision.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service