Editorial team ·

Selected, focused, or unavailable? Make the grid states distinct

Editorial cover: Selected, focused, or unavailable? Make the grid states distinct
AI-generated illustration.

A card grid is full of blue outlines. One outline means you selected an item. Another appears when you move the keyboard focus. A grey card is unavailable. If those states all look like small variations on a border, it is easy to mistake where you are for what you have chosen.

Give each state one job and one clear cue

Three visible states for a fictional choice grid
State Example cue Review question
Selected Check mark plus “Selected” Does it remain after focus moves?
Keyboard focus Visible outline Can I see it on a selected card too?
Unavailable Text explanation beside the option Can I find out why before leaving the grid?

In the example, the selected card has “Selected” and a check mark. Focus has a continuous outline around whichever control the keyboard is on. An unavailable choice carries a short visible explanation if the design needs people to know why it cannot be chosen.

Move focus onto the selected card. You should be able to see both states. Then move onto another card and check whether the original selection remains indicated. Try at regular size and with enlarged text in case the badge wraps or covers a label.

Inspect the accessible state of the control as well. A selected radio choice can expose its checked state. For some designs a disabled control may be skipped by Tab. Make sure any explanation people need is available in ordinary text too.

Check colour contrast for the visual cues someone needs to identify the control or its state. WCAG 2.2 has a non-text contrast criterion with exceptions. Match the check to the actual cue on the screen.

Test the combinations people actually see

  1. Switch states with the keyboard
    • Select an item and move focus to its neighbour.
    • Verify that the selection remains readable.
  2. Check how information is exposed
    • Read the name and state with a screen reader.
    • Make sure an unavailable option has any needed explanation nearby.

Questions and answers

Can I use colour to reinforce selection?
Yes. Pair it with a cue like text, a check mark, or an identifiable shape.
Do focus and selection always move together?
That depends on the component. Test and document the behaviour the control is designed to use.
Should I screenshot the two states separately?
Take both individually and add a shot where focus is on the selected card so the overlap is visible.

W3C WCAG 2.2: Use of Color

W3C WCAG 2.2: Non-text Contrast