HIYSL REFERENCE / FIELD NOTES

How to Compare Focus Indicator Contrast With Adjacent Colors

Contents
AI-generated illustration; not taken on location · Illustration labeling a focus ring and the colors touching it.
AI-generated illustration; not taken on location · A focus indicator and its adjacent colors.AI-generated illustration

To compare a focus indicator with its adjacent colors, move keyboard focus to a control, identify the visible cue, and note every color that touches the part of the cue you need to recognize. Enter each relevant pair into a contrast checker, then compare the reported ratios with the guidance that applies to your situation.

The useful result is more than a single number. A cue may touch different colors around a control, appear inside the control, or change in another display mode. This guide helps you record those relationships and interpret the result without treating a contrast ratio as a complete visibility assessment.

Find the focused component and its indicator

Start on the page or screen you want to assess. Use the keyboard to move focus to a control, such as a button or link. Watch the control as focus arrives and leaves. If you are unsure which control has focus, move through the available controls again and look for the visual change that follows keyboard focus.

The indicator might appear as an outline, a border, or a change within the control. Describe what you see before choosing colors: for example, “a dark line around the button” or “a mark inside the control.” If several things change at once, record each change and consider which part you rely on to recognize focus. That choice determines which colors you need to examine.

Separate the cue from its surroundings

Imagine a button with a colored fill and a line just outside its edge. The line is the possible focus cue; the button fill and the surrounding surface are separate areas to investigate. If the cue is a change inside the button, the relevant neighboring area may be another part of the button itself.

Keep the focused control visible while you take notes. Write down the control, the page or screen, and a short description of the cue. If focus moves when you attempt to inspect it, return to the control and repeat the observation. A clear description makes it easier to check the same feature again and explain an uncertain result to someone else.

Identify the colors touching the cue

Trace the visible cue along its edge and ask what color touches it at each point. For an outer line, inspect both the area toward the control and the area away from it. For a cue inside a control, look at the neighboring parts of that control. The adjacent color is the color at the boundary you are examining, so the same indicator can have more than one relevant neighbor.

A practical way to organize the inspection is to make a small list:

  • Cue: the particular line, border, or internal change you are assessing.
  • First neighbor: the color touching one side or portion of that cue.
  • Other neighbors: any different colors touching it elsewhere.
  • Context: the control and display conditions in which you observed those colors.

For example, if a focus line sits between a button fill and a page background, record the line color and both neighboring colors. If it crosses another colored area, record that area too. Do not assume the color beside the top edge is also beside every other edge; inspect the visible boundary.

When the cue has layers

If you see two lines or a line with an inner and outer band, describe the layers separately. Note which colors actually touch each layer and which part is needed to recognize focus. Check the relevant touching pairs rather than treating the entire effect as one color. If you cannot distinguish the layers or determine their colors reliably, mark the observation as uncertain and seek the underlying color values before relying on a ratio.

Compare the relevant color pairs

Gather a color value for the cue and for each neighboring color you identified. Use values you can determine reliably; if a value is unclear, record that uncertainty instead of silently choosing an approximate shade. A color picker may help you inspect an area, but confirm what its selected value represents before using it as evidence for a fine or blended edge.

Open a contrast checker and enter the cue color and one adjacent color in the input format the checker accepts. Record the ratio it reports. Repeat with the same cue color and each other relevant neighboring color. If the cue has multiple layers, repeat the process for the layer boundaries you identified, keeping the pairs labeled so you can tell them apart later.

Observation Pair to record What to do next
A cue touches one surrounding color Cue and that surrounding color Record the reported ratio
A cue touches a control fill and a page background Cue and fill; cue and background Record both results separately
A cue has distinct touching layers Each relevant layer and its neighbor Label each boundary and result

Contrast ratios use relative luminance. To interpret a result, consult the non-text contrast guidance applicable to your situation and identify the requirement and threshold relevant to the cue being assessed. The official Section508.gov color accessibility guidance is a starting point for that review.

Keep your notes together: color values, pair labels, reported ratios, and the guidance you applied. A ratio without its color pair and context is difficult to interpret or reproduce.

Interpret a borderline or unclear result

When a reported ratio is close to the applicable threshold, check how much precision the tool exposes. A rounded display can leave you unable to tell whether the underlying result is on one side of a boundary or the other. If the checker provides an unrounded value, use it when applying the relevant guidance. If it does not provide enough precision, record that limitation and use a method that gives you enough information to interpret the result.

Also review how you obtained the colors. A thin line, a blended edge, or anti-aliasing can make it difficult to determine which values represent the cue and its neighbor. If a picker returns different values at nearby points, do not assume one sample settles the question. Look for a reliable way to establish the underlying colors, and document any remaining uncertainty. If you cannot establish the pair, the resulting number is only as dependable as the values entered.

What does the number tell you?

The ratio describes the relationship between the two colors supplied to the checker. It does not, by itself, establish that a person can easily see the complete indicator in the interface or that every accessibility criterion has been satisfied. Return to the focused control and consider whether the cue is recognizable as focus, including whether its relevant parts remain apparent against their surroundings.

For a borderline result, keep the observation, values, precision, and applicable guidance together. That record helps another reviewer understand whether the uncertainty lies in the colors, the reported ratio, or the rule being applied.

Recheck the indicator in context

Repeat the inspection wherever the same kind of control appears against a different surrounding color. Move focus to it, identify the cue again, and list the colors touching the relevant parts. A result recorded for one background does not answer a question about a different pair: enter the new pair and keep its result with the new context.

If you use another display mode, repeat the observation there as well. Record what you can actually see and determine in that mode rather than assuming the previous color values still describe it. If a cue or its neighbors are difficult to identify, note that and seek a reliable way to inspect them before drawing a conclusion.

Keep the two comparisons distinct

Adjacent-color contrast asks how the cue compares with colors touching it in the focused view. A separate comparison considers what changes between the focused and unfocused states. To examine that change, observe the same control with focus and without it, and record which visual features differ. Do not substitute a focused-versus-unfocused comparison for the adjacent pairs, or assume the adjacent-pair results answer every question about the state change.

Before finishing, ask yourself:

  1. Can I identify the focused control and the cue I used to recognize it?
  2. Have I recorded each relevant color touching that cue, including any different colors around it?
  3. Are the color values and ratio precision reliable enough to compare with the applicable guidance?
  4. Have I inspected the cue in its actual contexts and considered checks beyond the numerical result?

If an answer is uncertain, preserve that uncertainty in your notes and resolve it before presenting the assessment as complete.

Sources