--- url: "https://www.w3.org/WAI/WCAG22/Techniques/css/C15" titulek: "C15: Using CSS to change the presentation of a user interface component when it receives focus | WAI | W3C" h1: "Technique C15:Using CSS to change the presentation of a user interface component when it receives focus" popis: "" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 04:43:56" znaku: 3524 slov: 498 kodovani: "utf-8" sha256: "f134bb8071141a6020e84cbb306c381013ff8cb9eb94c80a677e7f392542de74" --- # Technique C15:Using CSS to change the presentation of a user interface component when it receives focus ## About this Technique This technique relates to: - [1.4.1 Use of Color](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color) ( **Advisory** ) - [2.4.7 Focus Visible](https://www.w3.org/WAI/WCAG22/Understanding/focus-visible) ( **Sufficient** ) This technique applies to CSS, HTML. Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are **not required** to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See [About WCAG Techniques](https://www.w3.org/WAI/WCAG22/Techniques/about). ## Description The objective of this technique is to demonstrate how visual appearance may be enhanced via style sheets to provide visual feedback when an interactive element has focus or when a user hovers over it using a pointing device. Highlighting the element that has focus or is hovered over can provide information such as the fact that the element is interactive or the scope of the interactive element. Providing visual feedback may be possible through more than one mode. Usually, it is attained through using a mouse to hover over the element or a keyboard to tab to the element. ## Examples ### Example 1: Link elements In this example, mouse and keyboard focus indicators have been applied to the link elements. CSS has been used to apply a background color when the link elements receive focus. Here is the content to be displayed: ```