From a5ae4360c69edd152df438ea4401142ffb8de235 Mon Sep 17 00:00:00 2001 From: hata6502 <7702653+hata6502@users.noreply.github.com> Date: Sat, 2 Nov 2024 02:04:16 +0900 Subject: [PATCH 1/3] Set up dotted-underlines technique --- techniques/css/dotted-underlines.html | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 techniques/css/dotted-underlines.html diff --git a/techniques/css/dotted-underlines.html b/techniques/css/dotted-underlines.html new file mode 100644 index 0000000000..161be523ab --- /dev/null +++ b/techniques/css/dotted-underlines.html @@ -0,0 +1,65 @@ + + + + Technique Title + + + +

Technique Title

+
+

Metadata

+

Provide information below to help editors associate the technique properly. Contents of the meta section are not output by the processor.

+

+

+
+
+

Applicability

+

Describe the situations in which to use the technique, such as types of pages, features in use that might use the technique, etc. Do not add references to the part of WCAG to which the technique relates; this is taken from the Understanding pages and inserted in technique pages upon publication.

+
+
+

Description

+

Describe how the technique works. This begins with a description of the problem the technique solves, then describes how to apply the technique. The description should be detailed enough to provide all the information a reader needs to be able to apply the technique, without recourse to following example code.

+

The objective of this technique is to ...

+
+
+

Examples

+

Copy the following section for each example. Examples must have a title and a description, and usually have a code sample. Code samples should be elided if necessary to show the core of the technique without necessarily providing all the surrounding code that would also be involved. A working example link references a location where the technique can be shown working live.

+
+

Example Title

+

Description

+ Code sample +

Working example of {Example Title}

+
+
+
+

Tests

+

Tests must have a test procedure and expected results. Populate the following sections as appropriate. If a technique has multiple alternative testing approaches, add a new section with class="test" for each one, and put the test-procedure and test-results sections inside that.

+
+

Procedure

+
    +
  1. Step 1
  2. +
+
+
+

Expected Results

+ +
+
+ +
+

Resources

+

Provide links to external resources that are relevant to users of the technique. This section is optional.

+ +
+ + From 65a503ba2424977d44b76f741740f7787a2d9611 Mon Sep 17 00:00:00 2001 From: hata6502 <7702653+hata6502@users.noreply.github.com> Date: Sat, 2 Nov 2024 02:13:37 +0900 Subject: [PATCH 2/3] Dotted underline link technique and working example --- techniques/css/dotted-underlines.html | 47 +++++++++------- .../css-dotted-underline-link/index.html | 53 +++++++++++++++++++ 2 files changed, 80 insertions(+), 20 deletions(-) create mode 100644 working-examples/css-dotted-underline-link/index.html diff --git a/techniques/css/dotted-underlines.html b/techniques/css/dotted-underlines.html index 161be523ab..6134aeb667 100644 --- a/techniques/css/dotted-underlines.html +++ b/techniques/css/dotted-underlines.html @@ -1,64 +1,71 @@ - Technique Title + Using dotted underlines and colors that provides contrast ratio of 3:1 with surrounding text to links -

Technique Title

+

Using dotted underlines and colors that provides contrast ratio of 3:1 with surrounding text to links

Metadata

-

Provide information below to help editors associate the technique properly. Contents of the meta section are not output by the processor.

-

-

+

1.4.1

+

sufficient

Applicability

-

Describe the situations in which to use the technique, such as types of pages, features in use that might use the technique, etc. Do not add references to the part of WCAG to which the technique relates; this is taken from the Understanding pages and inserted in technique pages upon publication.

+

Pages there are a large number of links in the block of text.

Description

-

Describe how the technique works. This begins with a description of the problem the technique solves, then describes how to apply the technique. The description should be detailed enough to provide all the information a reader needs to be able to apply the technique, without recourse to following example code.

-

The objective of this technique is to ...

+

The objective of this technique is to provide a redundant visual cue for users who may not be able to discern a difference in text color.

+

Use of Color a relative luminance difference of 3:1 or greater with the text around can be used to identify links and surrounding texts. To meet success criterion 1.4.1: Use of Color, use dotted lines as additional visual cue.

+

This technique is an alternative to use solid underlines. Solid underlines might be visually distracting for pages there are a large number of links in the block of text. Links are commonly used to indicate words or phrases that are links within a paragraph or other block of text. Even using underlines on hover or keyboard focus only, they might not be used for users with touch devices.

Examples

-

Copy the following section for each example. Examples must have a title and a description, and usually have a code sample. Code samples should be elided if necessary to show the core of the technique without necessarily providing all the surrounding code that would also be involved. A working example link references a location where the technique can be shown working live.

-

Example Title

-

Description

- Code sample -

Working example of {Example Title}

+

Links with dotted underlines and colors that provides contrast ratio of 3:1 in wiki pages

+

The links in pages are medium-light blue (#4D6BD5) and the surrounding text is black (#111111). Links have a contrast of 3.9:1 with the surrounding text. Links also have minimal dotted underlines to reduce visually distracting in wiki pages there are a large number of links in the block of text.

+
body {
+	color: #111111;
+}
+
+a {
+	color: #4D6BD5;
+	text-decoration: underline dotted;
+}
+

Working example of dotted underline link

Tests

-

Tests must have a test procedure and expected results. Populate the following sections as appropriate. If a technique has multiple alternative testing approaches, add a new section with class="test" for each one, and put the test-procedure and test-results sections inside that.

Procedure

+

For each instance where color is used to convey information about text:

    -
  1. Step 1
  2. +
  3. Check that the relative luminance of the color of the text differs from the relative luminance of the surrounding text by a contrast ratio of at least 3:1.
  4. +
  5. Check that the link has a dotted underline.

Expected Results

Resources

-

Provide links to external resources that are relevant to users of the technique. This section is optional.

diff --git a/working-examples/css-dotted-underline-link/index.html b/working-examples/css-dotted-underline-link/index.html new file mode 100644 index 0000000000..ec71da9a9b --- /dev/null +++ b/working-examples/css-dotted-underline-link/index.html @@ -0,0 +1,53 @@ + + + + + Allowing for text spacing without wrapping + + + + +

Links with dotted underlines and colors that provides contrast ratio of 3:1 in wiki pages

+ +

+ Use of Color a relative luminance difference of 3:1 or greater with the text around can be used to identify links and surrounding texts. + To meet success criterion 1.4.1: Use of Color, use dotted lines as additional visual cue. +

+ +

+ This technique is an alternative to use solid underlines. + Solid underlines might be visually distracting for pages there are a large number of links in the block of text. + Links are commonly used to indicate words or phrases that are links within a paragraph or other block of text. + Even using underlines on hover or keyboard focus only, they might not be used for users with touch devices. +

+ +
+

If the links on this page are changed to solid underline...

+ +

+ Use of Color a relative luminance difference of 3:1 or greater with the text around can be used to identify links and surrounding texts. + To meet success criterion 1.4.1: Use of Color, use dotted lines as additional visual cue. +

+ +

+ This technique is an alternative to use solid underlines. + Solid underlines might be visually distracting for pages there are a large number of links in the block of text. + Links are commonly used to indicate words or phrases that are links within a paragraph or other block of text. + Even using underlines on hover or keyboard focus only, they might not be used for users with touch devices. +

+
+ + From 526d49c0f6c753219c66748e383a0cebb7621a28 Mon Sep 17 00:00:00 2001 From: hata6502 <7702653+hata6502@users.noreply.github.com> Date: Sat, 2 Nov 2024 02:25:35 +0900 Subject: [PATCH 3/3] Tiny fix from preview --- techniques/css/dotted-underlines.html | 6 +++--- working-examples/css-dotted-underline-link/index.html | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/techniques/css/dotted-underlines.html b/techniques/css/dotted-underlines.html index 6134aeb667..8e0bc68275 100644 --- a/techniques/css/dotted-underlines.html +++ b/techniques/css/dotted-underlines.html @@ -27,12 +27,12 @@

Examples

Links with dotted underlines and colors that provides contrast ratio of 3:1 in wiki pages

The links in pages are medium-light blue (#4D6BD5) and the surrounding text is black (#111111). Links have a contrast of 3.9:1 with the surrounding text. Links also have minimal dotted underlines to reduce visually distracting in wiki pages there are a large number of links in the block of text.

body {
-	color: #111111;
+  color: #111111;
 }
 
 a {
-	color: #4D6BD5;
-	text-decoration: underline dotted;
+  color: #4D6BD5;
+  text-decoration: underline dotted;
 }

Working example of dotted underline link

diff --git a/working-examples/css-dotted-underline-link/index.html b/working-examples/css-dotted-underline-link/index.html index ec71da9a9b..ed3a4a4196 100644 --- a/working-examples/css-dotted-underline-link/index.html +++ b/working-examples/css-dotted-underline-link/index.html @@ -2,9 +2,11 @@ - Allowing for text spacing without wrapping + Links with dotted underlines and colors that provides contrast ratio of 3:1 in wiki pages