-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.wcag21, .wcag22 { | ||
background-color: #E9FBE9; | ||
border-left: solid .5em #52E052; | ||
} | ||
span.wcag21, span.wcag22 { | ||
margin-left: .25em; | ||
padding-left: .25em; | ||
} | ||
div.wcag21, div.wcag22 { | ||
margin: 1em auto; | ||
padding: .5em; | ||
page-break-inside: avoid; | ||
} | ||
.new-version { | ||
font-size: smaller; | ||
font-weight: bold; | ||
} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<title>Figure source: Focus Indicator Custom Shapes</title> | ||
<style> | ||
button { | ||
box-sizing: border-box; | ||
margin-top: 15px; | ||
margin-bottom: 15px; | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
width: 90px; | ||
height: 30px; | ||
font-size: 12px; | ||
} | ||
|
||
.blue button { | ||
border: 2px solid #48f; | ||
} | ||
</style> | ||
|
||
<main> | ||
<h1>Figure source: Focus Indicator Browser Defaults</h1> | ||
<div> | ||
<h2>Unmodified indicator background</h2> | ||
<button>Example</button> | ||
<button>Example</button> | ||
<button>Example</button> | ||
</div> | ||
<div class="blue"> | ||
<h2>Blue indicator background</h2> | ||
<button>Example</button> | ||
<button>Example</button> | ||
<button>Example</button> | ||
</div> | ||
</main> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<title>Figure source: Focus Indicator Custom Shapes</title> | ||
<style> | ||
button { | ||
background: #17569D; | ||
border: none; | ||
border-radius: 0; | ||
box-shadow: none; | ||
box-sizing: border-box; | ||
color: #fff; | ||
margin-top: 15px; | ||
margin-bottom: 15px; | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
width: 90px; | ||
height: 30px; | ||
font-size: 12px; | ||
} | ||
|
||
button.focus-inset { | ||
position:relative; | ||
} | ||
button.focus-inset::after { | ||
--inset: 3px; | ||
content: ''; | ||
position: absolute; | ||
top: var(--inset); | ||
right: var(--inset); | ||
bottom: var(--inset); | ||
left: var(--inset); | ||
border: 3px solid yellow; | ||
} | ||
|
||
button.focus-side-highlights { | ||
border: 1px solid #17569D; | ||
position: relative; | ||
} | ||
button.focus-side-highlights::after { | ||
--inset: 1px; | ||
content: ''; | ||
position: absolute; | ||
top: var(--inset); | ||
right: var(--inset); | ||
bottom: var(--inset); | ||
left: var(--inset); | ||
border-left: 10px solid yellow; | ||
border-right: 10px solid yellow; | ||
} | ||
</style> | ||
|
||
<main> | ||
<h1>Figure source: Focus Indicator Custom Shapes</h1> | ||
<p>All examples are 90px x 30px buttons, so have 480px<sup>2</sup> minimum indicator area.</p> | ||
<div> | ||
<h2>Passes: 3px inset, 3px thick</h2> | ||
<p>Indicator area = (84 * 24) - (78 * 18) = 612px<sup>2</sup> > 480px<sup>2</sup></p> | ||
<button>Example</button> | ||
<button class="focus-inset">Example</button> | ||
<button>Example</button> | ||
</div> | ||
<div> | ||
<h2>Passes: 2 28px x 9px rectangles</h2> | ||
<p>Indicator area = 2 * 28 * 9 = 504px<sup>2</sup> > 480px<sup>2</sup></p> | ||
<button>Example</button> | ||
<button class="focus-side-highlights">Example</button> | ||
<button>Example</button> | ||
</div> | ||
</main> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<title>Figure source: Focus Indicator Custom Shapes</title> | ||
<style> | ||
button { | ||
background: #AECFF4; | ||
border: 3px solid black; | ||
border-radius: 4px; | ||
box-shadow: none; | ||
box-sizing: border-box; | ||
color: #000; | ||
margin-top: 15px; | ||
margin-bottom: 15px; | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
width: 90px; | ||
height: 30px; | ||
font-size: 12px; | ||
} | ||
|
||
button.focus-low-change-contrast { | ||
/* > 3:1 with button bg and page bg, < 3:1 with unfocused button border */ | ||
border-color: #666; | ||
} | ||
button.focus-low-adjacent-contrast { | ||
/* < 3:1 with button bg and page bg, > 3:1 with unfocused button border */ | ||
border-color: #ccc; | ||
} | ||
</style> | ||
|
||
<main> | ||
<h1>Figure source: Focus Indicator Relationship with Non-text Contrast</h1> | ||
<div> | ||
<h2>Passes Focus Appearance, fails Non-text Contrast</h2> | ||
<button>Example</button> | ||
<button class="focus-low-adjacent-contrast">Example</button> | ||
<button>Example</button> | ||
</div> | ||
<div> | ||
<h2>Passes Non-text Contrast, fails Focus Appearance</h2> | ||
<button>Example</button> | ||
<button class="focus-low-change-contrast">Example</button> | ||
<button>Example</button> | ||
</div> | ||
</main> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<title>Figure source: Focus Indicator Offset Types</title> | ||
<style> | ||
:root { | ||
/* | ||
For figure accuracy: | ||
- indicator-fg must meet 3:1 with page-bg, button-bg, and button-border-fg | ||
- indicator-thickness must be exactly 2px | ||
- indicator-style must be solid | ||
|
||
For figure clarity: | ||
- button-border-fg should meet 4.5:1 with page-bg and button-bg | ||
- indicator-fg should meet 4.5:1 with page-bg, button-bg, and button-border-fg | ||
*/ | ||
--indicator-offset: 3px; | ||
--indicator-thickness: 2px; | ||
--indicator-style: solid; | ||
|
||
--indicator-fg: #000; | ||
--page-bg: #fff; | ||
--button-bg: #cce; | ||
--button-fg: #000; | ||
--button-border-fg: #77a; | ||
|
||
--button-border-radius: 10px; | ||
} | ||
button { | ||
background: var(--button-bg);; | ||
border: solid 2px var(--button-border-fg); | ||
border-radius: var(--button-border-radius); | ||
box-shadow: none; | ||
box-sizing: border-box; | ||
color: var(--button-fg); | ||
margin-top: 15px; | ||
margin-bottom: 15px; | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
outline: none; | ||
width: 150px; | ||
height: 50px; | ||
font-size: 24px; | ||
} | ||
.button-container { | ||
display: flex; | ||
width: 100%; | ||
justify-content: center | ||
} | ||
|
||
.outset { | ||
outline-offset: var(--indicator-offset); | ||
outline: var(--indicator-thickness) var(--indicator-style) var(--indicator-fg); | ||
} | ||
|
||
.outline { | ||
outline: var(--indicator-thickness) var(--indicator-style) var(--indicator-fg); | ||
} | ||
|
||
.border { | ||
border: var(--indicator-thickness) var(--indicator-style) var(--indicator-fg); | ||
} | ||
|
||
.inset { | ||
position:relative; | ||
} | ||
.inset::after { | ||
content: ''; | ||
position: absolute; | ||
top: var(--indicator-offset); | ||
right: var(--indicator-offset); | ||
bottom: var(--indicator-offset); | ||
left: var(--indicator-offset); | ||
border: var(--indicator-thickness) var(--indicator-style) var(--indicator-fg); | ||
border-radius: calc(var(--button-border-radius) - var(--indicator-offset)); | ||
} | ||
</style> | ||
|
||
<main> | ||
<h1>Figure source: Focus Indicator Offset Types</h1> | ||
<div class="button-container"> | ||
<button>Unfocused</button> | ||
</div> | ||
<div class="button-container"> | ||
<button class="outset">Outset</button> | ||
<button class="outline">Outline</button> | ||
<button class="border">Border</button> | ||
<button class="inset">Inset</button> | ||
</div> | ||
</main> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<title>Figure source: Focus Indicator Two Color</title> | ||
<style> | ||
button { | ||
background: #17569D; | ||
border: none; | ||
border-radius: 0; | ||
box-shadow: none; | ||
box-sizing: border-box; | ||
color: #fff; | ||
margin-top: 15px; | ||
margin-bottom: 15px; | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
width: 150px; | ||
height: 50px; | ||
font-size: 24px; | ||
} | ||
button.focus-thick { | ||
outline: solid 2px black; | ||
outline-offset: 2px; | ||
box-shadow: 0 0 0 2px #aaa; | ||
} | ||
button.focus-thin { | ||
outline: solid 1px black; | ||
outline-offset: 1px; | ||
box-shadow: 0 0 0 1px #aaa; | ||
} | ||
</style> | ||
|
||
<main> | ||
<h1>Figure source: Focus Indicator Two Color</h1> | ||
<div> | ||
<h2>Passes: the 2px thick black line passes</h2> | ||
<button>Example</button> | ||
<button class="focus-thick">Example</button> | ||
</div> | ||
<div> | ||
<h2>Fails: the indicator is 2px thick, but the part of the indicator meeting change contrast is only 1px thick</h2> | ||
<button>Example</button> | ||
<button class="focus-thin">Example</button> | ||
</div> | ||
</main> | ||
|
||
</html> |