Widoczny fokus
Objaśnienie
KS
2.4.7
Intent of Focus Visible
The purpose of this success criterion is to help a person know which element has the keyboard focus.
“Mode of operation” accounts for user agents which may not always show a focus indicator, or only show the focus indicator when the keyboard is used. User agents may optimise when the focus indicator is shown, such as only showing it when a keyboard is used. Authors are responsible for providing at least one mode of operation where the focus is visible. In most cases there is only one mode of operation so this success criterion applies. The focus indicator must not be time limited, when the keyboard focus is shown it must remain.
Note that a keyboard focus indicator can take different forms. This criterion does not specify what the form is, but Focus Appearance (Minimum) does define how visible the indicator should be. Passing Focus Appearance (Minimum) would pass this success criterion.
Benefits of Focus Visible
- This Success Criterion helps anyone who relies on the keyboard to operate the page, by letting them visually determine the component on which keyboard operations will interact at any point in time.
- People with attention limitations, short term memory limitations, or limitations in executive processes benefit by being able to discover where the focus is located.
Examples of Focus Visible
- When text fields receive focus, a vertical bar is displayed in the field, indicating that the user can insert text, OR all of the text is highlighted, indicating that the user can type over the text.
- When a user interface control receives focus, a visible border is displayed around it.
Resources for Focus Visible
Techniques for Focus Visible
Sufficient Techniques for Focus Visible
- Using user interface components that are highlighted by the user agent when they receive focus
- Using CSS to change the presentation of a user interface component when it receives focus
- G165: Using the default focus indicator for the platform so that high visibility default focus indicators will carry over
- Using an author-supplied, highly visible focus indicator
- Creating a two-color focus indicator to ensure sufficient contrast
- Using script to change the background color or border of the element with focus