Skip to content
easeweb
Search topics

Low-contrast text in brand colours and hover states

Links and prices are set in a bright brand colour too close to white, and a button turns paler on hover just as someone is about to click it.

WCAG 2.2
SC 1.4.3AA
Required by
Section 508 · EN 301 549 (EU)
Broken color: #e8762c
The accessibility problem illustrated: Low vision:What does it say?
01

The problem

People with low vision can't read the menu and the prices, or a button while they point at it

02

Try it

Read the menu and the prices, then point at or Tab to an Order now button

Can you read every word, including the button while you hover over it or focus it?

Broken Can you fix this?

BrokenThe brand colour and a paler hover
  • Country loaf $6.80
  • Seeded rye $7.20

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Give text 4.5:1 against its background, in every state

Before
BrokenThe brand colour and a paler hover
:root {  --brand: #e8762c; /* 2.97:1 on white */}.nav a,.price {  color: var(--brand);}.button {  background: #b4501a; /* white text: 5.12:1 */  color: #fff;}.button:hover,.button:focus-visible {  background: #f0954f; /* white text: 2.30:1 */}
What is wrong2 points

Every colour here was picked to look right in the design file. The orange is the brand, and the paler hover feels like a light touch. But neither was measured against what is really behind the text in the state people see.

  • The menu links and the prices are hard to read. The orange is only 2.97:1 on white, where normal text needs 4.5:1.
  • The button's words almost vanish the moment someone points at it or tabs to it. The paler hover and focus background drops its white text from 5.12:1 to 2.30:1, below the 4.5:1 it needs.
After
FixA text shade of the brand and a darker hover
:root {  --brand: #e8762c;        /* decoration only */  --brand-text: #b4501a;   /* 5.12:1 on white */  --brand-strong: #8a3c0d; /* white text: 7.68:1 */}.nav a,.price {  color: var(--brand-text);}.button {  background: var(--brand-text);  color: #fff;}.button:hover,.button:focus-visible {  background: var(--brand-strong);  text-decoration: underline;}
How it is fixed3 steps
  1. Keep the brand orange for decoration, and give the links and prices a darker shade of it, --brand-text, at 5.12:1.
  2. Make the button's hover and focus background darker, not lighter, at 7.68:1.
  3. Underline the button on hover and focus, a second cue that doesn't depend on colour at all.

This fixes the Before and passes 1.4.3 in every state the code sets.

Implementation decisions
input::placeholder,textarea::placeholder {  color: #6b6b6b; /* 5.33:1 on white */  opacity: 1;}

04

Design ideas

Text can be soft, or sit on the brand colour, and still be read

Five more ways to set the bakery’s words, in the guide’s own colours. Point at each one and Tab to it: three keep their ratio in every state, and two lose it at rest.

In the design file

  • Write the contrast ratio and size next to every text colour. Normal text needs 4.5:1; text from 24 pixels, or 18.66 pixels bold, needs 3:1.
  • Draw hover and focus for every link and button, darker than at rest, not lighter, with their ratios.
  • Two oranges: the bright brand orange for decoration and a darker one for text, each named in the palette, so nobody sets text in the bright one.

Passes

  • A tinted pill for the current page The current page and the hovered item sit on a #fdf0e7 tint of the brand with #8a3c0d words, 6.88:1, so the menu stays warm without pale text. The bright #e8762c, 2.97:1 on white, only draws the dot, which nobody has to read.
  • Country loaf $6.80

    Dark words on the bright brand The bright #e8762c stays as the button’s fill, and the label is #1a1a1a at 5.85:1, so the orange from the logo carries the button. With dark words the safe hover goes lighter: #f0954f lifts it to 7.56:1.
  • How we feed our sourdough starter
    Quiet grey meta text The date and reading time in #767676, 4.54:1 on white, the lightest neutral grey that passes for small text. Beside the #1a1a1a title, at 17.40:1, it still reads as secondary.

Fails

  • A soft tag in the brand orangeWCAG 1.4.3 The brand #e8762c on its own #fdf0e7 tint is 2.66:1, where a 12px label needs 4.5:1. The same tint with #8a3c0d words is 6.88:1 and still reads as orange.
  • How we feed our sourdough starter
    Light grey meta textWCAG 1.4.3 The same date and reading time in #aaaaaa, 2.32:1 on white, where small text needs 4.5:1. #767676 keeps the same hierarchy and passes.
05

Verify the fix

3 checks.

Test with: Contrast measurement, Mouse, Keyboard, Forced colors

0 of 3 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the colour tokens or the theme 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. Text set over a photo, a slideshow or a hero image is covered in low-contrast text over photos and hero images. Text that passes 4.5:1 but not the 7:1 of Level AAA is covered in grey body text under 7:1 contrast. A contrast ratio is a minimum, not proof that text is comfortable to read: thin weights, small sizes and long lines make reading harder at the same ratio. Check the complete pages with people who rely on it.

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