Synonyms: Focus, focus frame, focus appearance
The focus indicator displays which element currently has the keyboard focus (see DIN EN ISO 9241-161: 8.37).
The focus indicator is usually displayed with a border around the focused element. Other focus indicators are also permitted, provided that they meet the requirements, e.g.
- Inverting of foreground and background color,
- Changed background color,
- Changing the size of the element,
- Superimposing of a graphical element, such as a side bar.
In certain cases, several focus indicators can be displayed:
- Example 1: When a selection list receives the focus, a focus indicator can be displayed around the entire list. A focus indicator must also be displayed with the current list entry.
- Example 2: With a combined input field, the focus can be on the input field as well as on the selection list.
- Example 3: If an interactive element receives the focus within a page area, then the page area can also be shown as focused.
- Example 4: The title bars of all application windows that do not have the focus are shown grayed out.
In some cases, the focus indicator can be identical to the selection marker (i.e. the marking of the selected option, see Element status ), if the focused element is identical to the selected element:
- Example 1: A selection list without multiple selection has a focus indicator on the focused list entry. This indicator can serve as a selection marker at the same time, as the focused list entry is identical to the selected list entry. If this selection list does not also have a focus indicator for the entire list, however, to be able to detect whether the selection list is focused, it is necessary to ensure that the selection marker in the focused state of the selection list differs clearly from the selection marker in the non-focused state of the selection list (e.g. minimum contrast ratio 3:1).
- Example 2: A selection list without multiple selection has a focus indicator on the focused list entry, e.g. a border. This focus indicator is not used simultaneously as a selection marker. A different background color, for example, is used as the selection marker. When navigating through the list entries, both the focus indicator and the selection marker are moved. In this case, an additional focus indicator for the entire list or a differentiation of the selection marker in the focused and non-focused state is not necessary, as the focusing and selection can be perceived independently of each other.
- Beispiel 3: A multiple selection list has a focus indicator that surrounds the entire list. Since the focused list entry does not match the selected list entries in the case of the multiple selection list, the focus indicator and selection marker must be marked separately for the list entries (e.g., as shown in example 2 with a border and a different background color).
|The focus indicator must be visible at each navigation step.
|EN 301 549:
|The focus indicator must have a contrast ratio of at least 3:1 with respect to the background.
|EN 301 549:
|The elements must also have a contrast ratio of at least 4.5:1 for text and at least 3:1 for the content of graphics in the focused status.
|EN 301 549:
126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11
|The focus indicator should be clearly assignable to the focused element.
|EN 301 549:
|The element must be scrolled into the visible area on receiving the focus so that both the element and its focus indicator are visible.
Note: This also applies when navigating the arrow keys through the list entries of a selection list, for example.
|EN 301 549:
|The area of the focus indicator shall be at least as large as:
Use of the keyboard: focus indicatorPermalink "Use of the keyboard: focus indicator"
The change of the focus indicator within an element is described at the respective elements. The navigation within elements often takes place with the arrow keys.
Use of the pointing device: focus indicatorPermalink "Use of the pointing device: focus indicator"
|Placing the focus
|The focused element must be communicated to the Accessibility API
18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52
|The size and position of the focused element must be communicated to the Accessibility API. @- Note: This is important, for example, to ensure that screen magnifiers
|It must be possible to position the focus with assistive technology (see Use of the keyboard
184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124
Practical tip: focus indicatorPermalink "Practical tip: focus indicator"
The focus indicator must have sufficient contrast, and should be designed consistently at the same time. With applications that have different background colors, this can be achieved by using a two-color border (e.g. black and 05.15.2023 Page 68 of 317 white) that has sufficient contrast against each background. A two-color focus indicator is also useful with control elements on gradients or graphics.
For example: Two buttons on a color gradient from white to black. The top button is currently focused. The focus indicator consists of a black border (inside) and a white border (outside), which means that it always easy to see, regardless of the background color. It is the standard focus frame offered by Google Chrome.
Information about this article
You are welcome to send feedback by email about our handout!