Skip to content

Commit 1d12765

Browse files
committed
Add a11y callouts
1 parent 593443d commit 1d12765

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

site/content/docs/5.3/helpers/colored-links.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ toc: true
88

99
## Link colors
1010

11-
You can use the `.link-*` classes to colorize links. Unlike the [`.text-*` classes]({{< docsref "/utilities/colors" >}}), these classes have a `:hover` and `:focus` state.
11+
You can use the `.link-*` classes to colorize links. Unlike the [`.text-*` classes]({{< docsref "/utilities/colors" >}}), these classes have a `:hover` and `:focus` state. Some of the link styles use a relatively light foreground color, and should only be used on a dark background in order to have sufficient contrast.
1212

1313
{{< example >}}
1414
{{< colored-links.inline >}}
@@ -19,7 +19,7 @@ You can use the `.link-*` classes to colorize links. Unlike the [`.text-*` class
1919
{{< /example >}}
2020

2121
{{< callout info >}}
22-
Some of the link styles use a relatively light foreground color, and should only be used on a dark background in order to have sufficient contrast.
22+
{{< partial "callouts/warning-color-assistive-technologies.md" >}}
2323
{{< /callout >}}
2424

2525
## Link utilities

site/content/docs/5.3/utilities/link.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ added: 5.3
99

1010
## Link opacity
1111

12-
Change the alpha opacity of the link `rgba()` color value with utilities.
12+
Change the alpha opacity of the link `rgba()` color value with utilities. Please be aware that changes to a color's opacity can result in contrast ratios below the WCAG minimum.
1313

1414
{{< example >}}
1515
<p><a class="link-opacity-10" href="#">Link opacity 10</a></p>
@@ -38,11 +38,15 @@ Change the underline's color independent of the link text color.
3838
{{< example >}}
3939
{{< link-underline-colors.inline >}}
4040
{{- range (index $.Site.Data "theme-colors") }}
41-
<p><a href="#" class="link-dark link-underline-{{ .name }}">{{ .name | title }} underline</a></p>
41+
<p><a href="#" class="link-underline-{{ .name }}">{{ .name | title }} underline</a></p>
4242
{{- end -}}
4343
{{< /link-underline-colors.inline >}}
4444
{{< /example >}}
4545

46+
{{< callout info >}}
47+
{{< partial "callouts/warning-color-assistive-technologies.md" >}}
48+
{{< /callout >}}
49+
4650
### Underline offset
4751

4852
Change the underline's distance from your text. Offset is set in `em` units to automatically scale with the element's current `font-size`.
@@ -88,6 +92,10 @@ Just like the `.link-opacity-*-hover` utilities, `.link-offset` and `.link-under
8892
{{< /colored-links.inline >}}
8993
{{< /example >}}
9094

95+
{{< callout info >}}
96+
{{< partial "callouts/warning-color-assistive-technologies.md" >}}
97+
{{< /callout >}}
98+
9199
## Sass
92100

93101
In addition to the following Sass functionality, consider reading about our included [CSS custom properties]({{< docsref "/customize/css-variables" >}}) (aka CSS variables) for colors and more.

0 commit comments

Comments
 (0)