Skip to main content

Visible focus

When an interactive element has keyboard focus, there should be a visible focus state. For those navigating by keyboard, this indicates their current position within the interface—just as a pointer indicates current placement of the mouse.

Note:

Some screen readers offer their own version of a visible focus state. This is not the same as the visible focus state that appears on interactive elements, as screen readers access all content, not just interactive elements.

Two low-fidelity browser screens containing a list of cards, one displaying a border focus on a card, the other displaying a mouse pointer on a card

Because people perceive color differently, the focus state cannot be represented by color alone and must pass a graphical element contrast ratio of 3:1. Esri’s Calcite Design System uses both color and a thick border-stroke in its focus states.

Two Calcite accordions collapsed with the first one displaying a blue 2 px border stroke as a focus indicator

Note:

Focus state and active state are not the same and should not be presented the same visually. Active state indicates a previous selection, whereas focus state indicates the current location of keyboard navigation.

Scrollbars

As part of the WCAG 2.1.1 Keyboard guideline, any content that scrolls using a mouse must also be keyboard navigable. Typically, scrolling is supported by arrow keys. However, in panels or containers with a fixed-height or fixed-width, focus may need to be moved to the container before the arrow keys will work.

New item modal dialog box in ArcGIS Online with visible focus on body content and always visible scrollbar inherited from user's operating system

In Windows 11 and Mac, scrollbars are not visible by default. If having scrollbar tracks persistent in the interface makes it easier to determine scrollable areas, you can enable this on your own operating system.

Windows 11

In Windows 11, follow these steps to enable scrollbars:

  1. Open Settings.

  2. Select Accessibility.

  3. Select Visual effects.

  4. Switch Always show scrollbars to On.

Mac Ventura

In macOS Ventura and later, follow these steps to enable scrollbars:

  1. Open System Settings.

  2. Select Appearance.

  3. Under the Show scroll bars section, select Always.

Mac Monterey

In macOS Monterey and earlier, follow these steps to enable scrollbars:

  1. Open System Settings.

  2. Select General.

  3. Under the Show scroll bars section, select Always.

Related criteria

The Web Content Accessibility Guidelines tied to this topic are as follows: