diff --git a/css/base.css b/css/base.css index be7d1dd2e0..089f292a34 100644 --- a/css/base.css +++ b/css/base.css @@ -203,9 +203,9 @@ margin: 1.2em 0; align-items: stretch; } -#site-header.minimal-header .minimal-header-name, -#site-header.minimal-header .minimal-header-subtitle, -#site-header.minimal-header .minimal-header-link +#site-header.minimal-header .minimal-header-name, +#site-header.minimal-header .minimal-header-subtitle, +#site-header.minimal-header .minimal-header-link { display: flex; flex-direction: column; @@ -411,7 +411,7 @@ font-size: 95%; .standalone-resource-about a, .standalone-resource-pager a, .standalone-resource-about span, -.standalone-resource-pager span +.standalone-resource-pager span { margin-left:.8em; margin-right:.8em; @@ -444,6 +444,11 @@ figure svg { border: 1px solid var(--line-grey); } +figure svg[role*="image"] { + display: block; + max-inline-size: 100%; +} + figcaption { font-weight: initial; border-bottom: initial; diff --git a/understanding/21/img/1.4.11-ntc-checkbox-purple.svg b/understanding/21/img/1.4.11-ntc-checkbox-purple.svg new file mode 100644 index 0000000000..c02aae8309 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-checkbox-purple.svg @@ -0,0 +1,6 @@ + diff --git a/understanding/21/img/1.4.11-ntc-focus-background.svg b/understanding/21/img/1.4.11-ntc-focus-background.svg new file mode 100644 index 0000000000..f07b8f20cf --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-focus-background.svg @@ -0,0 +1,16 @@ + diff --git a/understanding/21/img/1.4.11-ntc-focus-border.svg b/understanding/21/img/1.4.11-ntc-focus-border.svg new file mode 100644 index 0000000000..3a9cb9cbd5 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-focus-border.svg @@ -0,0 +1,17 @@ + diff --git a/understanding/21/img/1.4.11-ntc-focus-inner-border.svg b/understanding/21/img/1.4.11-ntc-focus-inner-border.svg new file mode 100644 index 0000000000..bb93e737a6 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-focus-inner-border.svg @@ -0,0 +1,20 @@ + diff --git a/understanding/21/img/1.4.11-ntc-focus-inner-outer.svg b/understanding/21/img/1.4.11-ntc-focus-inner-outer.svg new file mode 100644 index 0000000000..bad9972845 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-focus-inner-outer.svg @@ -0,0 +1,20 @@ + diff --git a/understanding/21/img/1.4.11-ntc-focus-inner-white.svg b/understanding/21/img/1.4.11-ntc-focus-inner-white.svg new file mode 100644 index 0000000000..c57656f5df --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-focus-inner-white.svg @@ -0,0 +1,20 @@ + diff --git a/understanding/21/img/1.4.11-ntc-focus-inner.svg b/understanding/21/img/1.4.11-ntc-focus-inner.svg new file mode 100644 index 0000000000..deea21237a --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-focus-inner.svg @@ -0,0 +1,20 @@ + diff --git a/understanding/21/img/1.4.11-ntc-focus-outer-green.svg b/understanding/21/img/1.4.11-ntc-focus-outer-green.svg new file mode 100644 index 0000000000..8266993e66 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-focus-outer-green.svg @@ -0,0 +1,17 @@ + diff --git a/understanding/21/img/1.4.11-ntc-focus-outer-yellow.svg b/understanding/21/img/1.4.11-ntc-focus-outer-yellow.svg new file mode 100644 index 0000000000..d64c7a3dc4 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-focus-outer-yellow.svg @@ -0,0 +1,20 @@ + diff --git a/understanding/21/img/1.4.11-ntc-minimal-button.svg b/understanding/21/img/1.4.11-ntc-minimal-button.svg new file mode 100644 index 0000000000..1ba6c50ac7 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-minimal-button.svg @@ -0,0 +1,11 @@ + diff --git a/understanding/21/img/1.4.11-ntc-radio-custom.svg b/understanding/21/img/1.4.11-ntc-radio-custom.svg new file mode 100644 index 0000000000..6bc13cfc64 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-radio-custom.svg @@ -0,0 +1,21 @@ + diff --git a/understanding/21/img/1.4.11-ntc-star-examples-fail.svg b/understanding/21/img/1.4.11-ntc-star-examples-fail.svg new file mode 100644 index 0000000000..69a2b3799b --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-star-examples-fail.svg @@ -0,0 +1,11 @@ + diff --git a/understanding/21/img/1.4.11-ntc-star-examples-pass.svg b/understanding/21/img/1.4.11-ntc-star-examples-pass.svg new file mode 100644 index 0000000000..1d69b32bb9 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-star-examples-pass.svg @@ -0,0 +1,14 @@ + diff --git a/understanding/21/img/1.4.11-ntc-text-input-background-border.svg b/understanding/21/img/1.4.11-ntc-text-input-background-border.svg new file mode 100644 index 0000000000..26e3550335 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-text-input-background-border.svg @@ -0,0 +1,9 @@ + diff --git a/understanding/21/img/1.4.11-ntc-text-input-background.svg b/understanding/21/img/1.4.11-ntc-text-input-background.svg new file mode 100644 index 0000000000..e6873f7bd8 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-text-input-background.svg @@ -0,0 +1,8 @@ + diff --git a/understanding/21/img/1.4.11-ntc-text-input-default.svg b/understanding/21/img/1.4.11-ntc-text-input-default.svg new file mode 100644 index 0000000000..82ea0232c7 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-text-input-default.svg @@ -0,0 +1,8 @@ + diff --git a/understanding/21/img/1.4.11-ntc-text-input-focus.svg b/understanding/21/img/1.4.11-ntc-text-input-focus.svg new file mode 100644 index 0000000000..2bf292f478 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-text-input-focus.svg @@ -0,0 +1,10 @@ + diff --git a/understanding/21/img/1.4.11-ntc-text-input-minimal.svg b/understanding/21/img/1.4.11-ntc-text-input-minimal.svg new file mode 100644 index 0000000000..ee195aef83 --- /dev/null +++ b/understanding/21/img/1.4.11-ntc-text-input-minimal.svg @@ -0,0 +1,12 @@ + diff --git a/understanding/21/img/minimal-button.png b/understanding/21/img/minimal-button.png deleted file mode 100644 index c21c3d4470..0000000000 Binary files a/understanding/21/img/minimal-button.png and /dev/null differ diff --git a/understanding/21/img/ntc-focus-background.png b/understanding/21/img/ntc-focus-background.png deleted file mode 100644 index 32b480ebc2..0000000000 Binary files a/understanding/21/img/ntc-focus-background.png and /dev/null differ diff --git a/understanding/21/img/ntc-focus-border.png b/understanding/21/img/ntc-focus-border.png deleted file mode 100644 index dc374b654a..0000000000 Binary files a/understanding/21/img/ntc-focus-border.png and /dev/null differ diff --git a/understanding/21/img/ntc-focus-inner-border.png b/understanding/21/img/ntc-focus-inner-border.png deleted file mode 100644 index 5d564ffce7..0000000000 Binary files a/understanding/21/img/ntc-focus-inner-border.png and /dev/null differ diff --git a/understanding/21/img/ntc-focus-inner-outer.png b/understanding/21/img/ntc-focus-inner-outer.png deleted file mode 100644 index cfc69d0af8..0000000000 Binary files a/understanding/21/img/ntc-focus-inner-outer.png and /dev/null differ diff --git a/understanding/21/img/ntc-focus-inner-white.png b/understanding/21/img/ntc-focus-inner-white.png deleted file mode 100644 index 9ca6d0ed5b..0000000000 Binary files a/understanding/21/img/ntc-focus-inner-white.png and /dev/null differ diff --git a/understanding/21/img/ntc-focus-inner.png b/understanding/21/img/ntc-focus-inner.png deleted file mode 100644 index 8d633ded9d..0000000000 Binary files a/understanding/21/img/ntc-focus-inner.png and /dev/null differ diff --git a/understanding/21/img/ntc-focus-outer-green.png b/understanding/21/img/ntc-focus-outer-green.png deleted file mode 100644 index e6d64cdfe7..0000000000 Binary files a/understanding/21/img/ntc-focus-outer-green.png and /dev/null differ diff --git a/understanding/21/img/ntc-focus-outer-yellow.png b/understanding/21/img/ntc-focus-outer-yellow.png deleted file mode 100644 index b8266cac0f..0000000000 Binary files a/understanding/21/img/ntc-focus-outer-yellow.png and /dev/null differ diff --git a/understanding/21/img/text-input-background-border.png b/understanding/21/img/text-input-background-border.png deleted file mode 100644 index 45051d8478..0000000000 Binary files a/understanding/21/img/text-input-background-border.png and /dev/null differ diff --git a/understanding/21/img/text-input-background.png b/understanding/21/img/text-input-background.png deleted file mode 100644 index 8776771426..0000000000 Binary files a/understanding/21/img/text-input-background.png and /dev/null differ diff --git a/understanding/21/img/text-input-default.png b/understanding/21/img/text-input-default.png deleted file mode 100644 index 033604eeda..0000000000 Binary files a/understanding/21/img/text-input-default.png and /dev/null differ diff --git a/understanding/21/img/text-input-focus.png b/understanding/21/img/text-input-focus.png deleted file mode 100644 index 51e41fb881..0000000000 Binary files a/understanding/21/img/text-input-focus.png and /dev/null differ diff --git a/understanding/21/img/text-input-minimal.png b/understanding/21/img/text-input-minimal.png deleted file mode 100644 index 5fff64b394..0000000000 Binary files a/understanding/21/img/text-input-minimal.png and /dev/null differ diff --git a/understanding/21/non-text-contrast.html b/understanding/21/non-text-contrast.html index ab57416b16..1f08b68ac0 100644 --- a/understanding/21/non-text-contrast.html +++ b/understanding/21/non-text-contrast.html @@ -53,14 +53,14 @@
This success criterion does not require that controls have a visual boundary indicating the hit area, but if the visual indicator of the control is the only way to identify the control, then that indicator must have sufficient contrast. If text (or an icon) within a button or placeholder text inside a text input is visible and there is no visual indication of the hit area then the success criterion is passed. If a button with text also has a colored border, since the border does not provide the only indication there is no contrast requirement beyond the text contrast (1.4.3 Contrast (Minimum)). Note that for people with cognitive disabilities it is recommended to delineate the boundary of controls to aid in the recognition of controls and therefore the completion of activities.
#949494
) adjacent to white.#949494
) adjacent to white.For user interface components 'adjacent colors' means the colors adjacent to the component. For example, if an input has a white internal background, dark border, and white external background the 'adjacent color' to the component would be the white external background.
#767676
) and white adjacent color outside the componentThe following example shows an input that has a light background on the inside and a dark background around it. The input also has a dark grey border which is considered to be subsumed into the dark background. The border does not interfere with identifying the component, so the contrast ratio is taken between the white background and dark blue background.
#003366
) is sufficient. There is also a border (silver) on the component that is not required to contrast with either.For visual information required to identify a state, such as the check in a checkbox or the thumb of a slider, that part might be within the component so the adjacent color might be another part of the component.
#E5E5E5
), which has a contrast ratio of 5.6:1 with the purple box (#6221EA
).It is possible to use a flat design where the status indicator fills the component and does not contrast with the component, but does contrast with the colors adjacent to the component.
#949494
) circle. The second and third show the radio button selected and filled with a color that contrasts with the color adjacent to the component. The last example shows the state indicator contrasting with the component colors.Non-text information within controls that uses a change of hue alone to convey the value or state of an input, such as a 1-5 star indicator with a black outline for each star filled with either yellow (full) or white (empty) is likely to fail the Use of color criterion rather than this one.
#FFF000
) to white contrast ratio of 1.2:1.
#FFFF00
) contrasts with the blue button background (#4189B9
).
#FFFF00
) does not contrast with the white background (#FFF
) which the component is on.
#008000
) does contrast with the white background (#FFF
) which the component is on. It does not need to contrast with both the component background and the component, as visually the effect is that the button is noticeably larger, and it's not necessary for a user to be able to discern this extra border in isolation. Although this passes non-text contrast, it is not a good indicator unless it is very thick. There is a AAA criterion in WCAG 2.2 that addresses this aspect, Focus Appearance.
If an indicator is partly inside and partly outside the component, either part of the indicator could provide contrast.
#FFFF00
) contrasts with the blue button background (#4189B9
).
If the focus indicator changes the border of the component within the visible boundary it must contrast with the component. Typically an outline goes around (outside) the visible boundary of the component, in this case changing the border is just inside the visible edge of the component.
#4189B9
) to green (#4B933A
). This is within the component and does not contrast with the inside background of the component.
#008000
) does contrast with the black border, but does not contrast with the blue component background.
Note that this success criterion does not directly compare the focused and unfocused states of a control - if the focus state relies on a change of color (e.g., changing only the background color of a button), this success criterion does not define any requirement for the difference in contrast between the two states.
The language of Non-text Contrast specifically calls out "visual information required to identify...states." When users talk about a hover state, they are normally referring to a visual effect that takes place when the pointer is positioned over a control. However, there are a number of HTML components (such as buttons, checkboxes, radio buttons, and selects) which do not by default display any additional visual effects when the user moves a pointer control over them. The pointer itself, via its location, is the indicator of whether the user is hovering on a component. Therefore, additional author-supplied visual treatments for hover are not "required to identify" the hover state. Those treatments can be considered supplemental and do not themselves need to contrast 3:1 against the background.
- +This is not to say that other hover effects are discouraged. For instance, some native components alter the shape of the pointer when it is hovering over a control; the pointer becomes an I-beam when it hovers over text inputs and text areas. There will be cases where some users may benefit from additional visual hover effects, such as bolding text or use of drop shadows. However, other users may find strong hover effects distracting. The key consideration for any hover effect is that it does not cause a component itself to lose sufficient contrast against adjacent colors, or cause the visual indicators for other states, such as focus or selection, to lose sufficient contrast.
#767676
), that indicator must meet 3:1 contrast ratio.#767676
), that indicator must meet 3:1 contrast ratio.#CCC
) outline has an insufficient contrast of 1.6:1 against the white (#FFF
) background, the cursor/caret which is displayed when the input receives focus does provide a sufficiently strong visual indication.#043464
).There are many possible solutions to ensuring contrast, the example shows the use of borders. Other techniques are to use darker colors for the circle backgrounds, or to add text labels & values for each item.