Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Practice Page for Supporting High Contrast #2991

Open
wants to merge 99 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
f13138e
Create starter page for high contrast practice.
mcking65 Apr 15, 2024
2aa2cff
updated high-conrast
jongund May 19, 2024
1e1a46e
update high contrast
jongund May 20, 2024
6be229a
updated hc practice
jongund May 20, 2024
6a48dca
added screen shots
jongund May 20, 2024
262cb8c
updated high contrast
jongund May 20, 2024
5615d1a
updated images
jongund May 20, 2024
f22bd34
updated high contrast
jongund May 21, 2024
192ba9b
creasted a temporary test page for system colors
jongund May 21, 2024
585de4d
udpated test page
jongund May 21, 2024
17f1481
update high contrast
jongund May 21, 2024
e276315
fixed linting error
jongund May 21, 2024
9888761
fixing linting errors
jongund May 21, 2024
f1babd7
fixing linting errors
jongund May 21, 2024
1a46146
fixing linting errors
jongund May 21, 2024
6ef309d
fixing linting errors
jongund May 21, 2024
65db7a8
fixing linting errors
jongund May 21, 2024
bdc3703
added some images
jongund May 21, 2024
11f080a
added images
jongund May 21, 2024
089f114
updated image references
jongund May 21, 2024
dc9045f
initial drati of high contrast practice
jongund May 22, 2024
5b217ce
added system colors table
jongund May 22, 2024
c18a8eb
updated color calc to support rgba values
jongund May 22, 2024
11fa5aa
updated sample cell to use backgorund color
jongund May 22, 2024
43c3089
udpated sample styling
jongund May 23, 2024
cc4e6f0
removed unused directory
jongund Jun 5, 2024
3772e35
added color description to system color table
jongund Jun 6, 2024
58c8461
fixed linting errors
jongund Jun 6, 2024
282e45d
fixed linting errors
jongund Jun 6, 2024
de2a7ac
fixed linting errors
jongund Jun 6, 2024
764061a
fixed linting errors
jongund Jun 6, 2024
2d423a0
fixed linting errors
jongund Jun 6, 2024
438ce61
fixed linting errors
jongund Jun 7, 2024
d262c7e
fixed linting errors
jongund Jun 7, 2024
f7c43f4
fixed linting errors
jongund Jun 7, 2024
8214beb
fixed linting errors
jongund Jun 7, 2024
ff1bdda
fixed linting errors
jongund Jun 7, 2024
c7d97ee
fixed linting errors
jongund Jun 7, 2024
0a729fb
fixed linting errors
jongund Jun 7, 2024
39a9f32
change system color table
jongund Jun 7, 2024
ca4c17b
updated links in testing
jongund Jun 10, 2024
a756270
fixed link
jongund Jun 10, 2024
bf0327e
updated intro
jongund Jun 10, 2024
a0c7063
updated intro
jongund Jun 10, 2024
063f221
updated intro
jongund Jun 11, 2024
4241863
updating testing
jongund Jun 11, 2024
d07dc26
updating testing
jongund Jun 11, 2024
bca805f
updating testing
jongund Jun 11, 2024
3b8a09b
added test page for contrast settings
jongund Jun 17, 2024
6516e91
moved test content
jongund Jun 18, 2024
f50b91a
udpated content
jongund Jun 18, 2024
0cd64aa
updated test page
jongund Jun 18, 2024
bb95302
updated test page
jongund Jun 19, 2024
57f8129
updated test page
jongund Jun 19, 2024
1418217
updated practices
jongund Jun 21, 2024
fb31974
updated practice
jongund Jun 21, 2024
25d9091
fixed spelling errors
jongund Jun 21, 2024
05f3a9a
updated tables
jongund Jun 21, 2024
905d420
linting issue with link
jongund Jun 23, 2024
622695e
updated information on color contrsdt options
jongund Jul 16, 2024
f6a1f65
updated information on user styling options
jongund Jul 19, 2024
6635543
updated descriptions
jongund Jul 19, 2024
582410e
fixed bug in computed color calculation
jongund Sep 3, 2024
4ea9ba5
updated system color table
jongund Sep 9, 2024
fd022f3
fixed bug
jongund Sep 9, 2024
a37b1bd
fixed bug
jongund Sep 9, 2024
a799c6f
Merge remote-tracking branch 'origin/main' into high-contrast-practice
mcking65 Sep 20, 2024
ae502f9
Merge branch 'main' into high-contrast-practice
jongund Oct 8, 2024
5329201
updated
jongund Oct 16, 2024
a4b8d01
Merge branch 'main' into high-contrast-practice
jongund Oct 17, 2024
fdb7459
editing practice
jongund Oct 17, 2024
f1c0bc1
updated content
jongund Oct 29, 2024
293b5be
fixed html linting bug
jongund Oct 29, 2024
78dbb01
fixed html bugs
jongund Oct 29, 2024
f13c18f
fix formatting
ariellalgilmore Oct 29, 2024
e9e7050
fix css linter issues
ariellalgilmore Oct 29, 2024
e443b28
testing push
jongund Oct 29, 2024
6f1fcee
testing push
jongund Oct 29, 2024
63dd6b9
updated css to remove diff info
jongund Oct 30, 2024
4228d10
Editorial revisions to intro
mcking65 Nov 3, 2024
b74d674
Link to WCAG min contrast requirement
mcking65 Nov 3, 2024
7a17372
More editorial revisions to intro
mcking65 Nov 3, 2024
dab664c
Editorial revisions to summary of operating system features.
mcking65 Nov 4, 2024
b2aa183
Satisfy HTML linter
mcking65 Nov 4, 2024
7ba8548
Consistency: change 'invert color setting' to 'invert colors setting'…
mcking65 Nov 4, 2024
0cf8008
Add tile to practices page
mcking65 Nov 4, 2024
210d77e
Editorial revisions to invert colors section
mcking65 Nov 4, 2024
3a815b8
updated caption styling and documentation for increase contrast example
jongund Nov 5, 2024
cf3612e
Merge branch 'high-contrast-practice' of github.com:w3c/aria-practice…
jongund Nov 5, 2024
68f23b3
added links to table of high contrast options
jongund Nov 6, 2024
40d5c43
added new color scheme example
jongund Nov 6, 2024
9b8760b
updated headings for color scheme
jongund Nov 6, 2024
5805beb
updated headings and example labels
jongund Nov 6, 2024
fdf05a7
added links for Linux/GNOME contrast options
jongund Nov 7, 2024
b03fac4
Updated SVG vs. bit-mapped section
jongund Nov 7, 2024
3ea722a
some minor edting of content and getting caption color to match previ…
jongund Nov 8, 2024
e6d953b
updated svg summary table
jongund Nov 9, 2024
b711a44
updated section on chrome media query emulation features
jongund Nov 9, 2024
e0e9d7a
updated svg vs bit-mapped table
jongund Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {

Check failure on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint-js

Use the global form of 'use strict'

Check failure on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / lint-js

'module' is not defined
"env": {
"browser": true,
"es2021": true
},
"extends": "airbnb-base",
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
}
}
132 changes: 132 additions & 0 deletions content/practices/high-contrast/css/switch-color-scheme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
button.color-scheme[role="switch"] {
display: block;
margin: 2px;
padding: 4px 4px 8px 8px;
border: 0 solid #005a9c;
border-radius: 5px;
width: 17em;
height: 3em;
text-align: left;
background-color: #e9e9e9;
color: #242424;
}

button.color-scheme[role="switch"][aria-checked="true"] {
background-color: #333333;

Check failure on line 15 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#333333" to be "#333" (color-hex-length)
color: #eeeee;

Check failure on line 16 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Unexpected invalid hex color "#eeeee" (color-no-invalid-hex)
border-color: #3366cc;

Check failure on line 17 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#3366cc" to be "#36c" (color-hex-length)
}

button.color-scheme[role="switch"] .label {
position: relative;
top: -3px;
display: inline-block;
padding: 0;
margin: 0;
width: 10em;
vertical-align: middle;
color: #242424;
}

button.color-scheme[role="switch"][aria-checked="true"] .label,
button.color-scheme[role="switch"][aria-checked="true"] .on {
color: #ffffff;

Check failure on line 33 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#ffffff" to be "#fff" (color-hex-length)
}

button.color-scheme[role="switch"] svg {
display: inline-block;
width: 36px;
height: 20px;
position: relative;
top: 4px;
}

button.color-scheme[role="switch"] svg rect {
fill: #a1a1a1;
stroke-width: 2;
stroke: #757575;
}

button.color-scheme[role="switch"] svg circle.off {
display: block;
stroke: #757575;
fill: #ffffff;

Check failure on line 53 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#ffffff" to be "#fff" (color-hex-length)
fill-opacity: 1;
}

button.color-scheme[role="switch"] svg circle.on {
display: none;
}

button.color-scheme[role="switch"][aria-checked="true"] svg rect {
fill: #3366cc;

Check failure on line 62 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#3366cc" to be "#36c" (color-hex-length)
stroke: #3366cc;

Check failure on line 63 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#3366cc" to be "#36c" (color-hex-length)
}

button.color-scheme[role="switch"][aria-checked="true"] svg circle.off {
display: none;
}

button.color-scheme[role="switch"][aria-checked="true"] svg circle.on {
display: block;
stroke: #ffffff;

Check failure on line 72 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#ffffff" to be "#fff" (color-hex-length)
fill: #ffffff;

Check failure on line 73 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#ffffff" to be "#fff" (color-hex-length)
fill-opacity: 1;
}

button.color-scheme[role="switch"] span.off {
display: inline-block;
}

button.color-scheme[role="switch"] span.on {
display: none;
}

button.color-scheme[role="switch"][aria-checked="true"] span.off {
display: none;
}

button.color-scheme[role="switch"][aria-checked="true"] span.on {
display: inline-block;
}

button.color-scheme[role="switch"]:focus,
button.color-scheme[role="switch"]:hover {
padding: 2px 2px 6px 6px;
border-width: 2px;
outline: none;
cursor: pointer;
}

button.color-scheme[role="switch"][aria-checked="true"]:focus,
button.color-scheme[role="switch"][aria-checked="true"]:hover {
border-color: #add8e6;
}


@media (prefers-color-scheme: dark) {
button.color-scheme[role="switch"] {
background-color: #333333;

Check failure on line 109 in content/practices/high-contrast/css/switch-color-scheme.css

View workflow job for this annotation

GitHub Actions / lint-css

Stylelint problem

Expected "#333333" to be "#333" (color-hex-length)
color: #ffffff;
}

button.color-scheme[role="switch"] .label {
color: #ffffff;
}

button.color-scheme[role="switch"] svg rect {
fill: #3366cc;
stroke: #3366cc;
}

button.color-scheme[role="switch"] svg circle.off,
button.color-scheme[role="switch"] svg circle.on {
fill: #ffffff;
stroke: #ffffff;
}

button.color-scheme[role="switch"]:focus,
button.color-scheme[role="switch"]:hover {
border-color: #add8e6;
}
}
119 changes: 119 additions & 0 deletions content/practices/high-contrast/css/switch-increase-contrast.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
button.increase-contrast[role="switch"] {
display: block;
margin: 2px;
padding: 4px 4px 8px 8px;
border: 0 solid #005a9c;
border-radius: 5px;
width: 17em;
height: 3em;
text-align: left;
background-color: #e9e9e9;
color: #242424;
}

button.increase-contrast[role="switch"][aria-checked="true"] {
background-color: #eee;
color: #000;
}

button.increase-contrast[role="switch"] .label {
position: relative;
top: -3px;
display: inline-block;
padding: 0;
margin: 0;
width: 10em;
vertical-align: middle;
color: #242424;
}

button.increase-contrast[role="switch"][aria-checked="true"] .label {
color: #242424;
}

button.increase-contrast[role="switch"] svg {
display: inline-block;
width: 36px;
height: 20px;
position: relative;
top: 4px;
}

button.increase-contrast[role="switch"] svg rect {
fill: #a1a1a1;
stroke-width: 2;
stroke: #757575;
}

button.increase-contrast[role="switch"] svg circle.off {
display: block;
stroke: #757575;
fill: #fff;
fill-opacity: 1;
}

button.increase-contrast[role="switch"] svg circle.on {
display: none;
}

button.increase-contrast[role="switch"][aria-checked="true"] svg rect {
fill: #0051a4;
stroke: #061d3a;
}

button.increase-contrast[role="switch"][aria-checked="true"] svg circle.off {
display: none;
}

button.increase-contrast[role="switch"][aria-checked="true"] svg circle.on {
display: block;
stroke: #061d3a;
fill: #fff;
fill-opacity: 1;
}

button.increase-contrast[role="switch"] span.off {
display: inline-block;
}

button.increase-contrast[role="switch"] span.on {
display: none;
}

button.increase-contrast[role="switch"][aria-checked="true"] span.off {
display: none;
}

button.increase-contrast[role="switch"][aria-checked="true"] span.on {
display: inline-block;
}

button.increase-contrast[role="switch"]:focus,
button.increase-contrast[role="switch"]:hover {
padding: 2px 2px 6px 6px;
border-width: 2px;
outline: none;
cursor: pointer;
}

@media (prefers-contrast: more) {
button.increase-contrast[role="switch"] {
background-color: #eee;
color: #000;
}

button.increase-contrast[role="switch"] .label {
color: #000;
}

button.increase-contrast[role="switch"] svg rect {
fill: #0051a4;
stroke: #061d3a;
}

button.increase-contrast[role="switch"] svg circle.off,
button.increase-contrast[role="switch"] svg circle.on {
stroke: #061d3a;
fill: #fff;
}
}
Loading
Loading