Skip to content

Commit b6e108f

Browse files
Merge branch 'main' into detlevhfischer-patch-1
2 parents 28b66de + fe3c324 commit b6e108f

27 files changed

+777
-659
lines changed

.github/workflows/check-files.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Check PR files
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
files:
8+
name: Check files
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0 # allows diffing against base branch
14+
- name: Check for videos
15+
run: |
16+
if test $(find -name '*.mp4' -o -name '*.mov' -o -name '*.m4v' -o -name '*.mkv' -o -name '*.webm' -o -name '*.ogv' | wc -l) -gt 0; then
17+
echo "::notice title=Video file found::Videos should not be stored in the repository; please ask the WAI Team for assistance."
18+
echo "CHECK_FAILED=1" >> "$GITHUB_ENV"
19+
fi
20+
- name: Check for non-finalized Technique filenames
21+
run: |
22+
if test $(find techniques/*/* -name '*.html' | egrep -vc '/[A-Z]+[0-9]+.html$') -gt 0; then
23+
echo "::notice title=Technique with temporary filename found::New techniques should follow the naming scheme for their folder."
24+
echo "CHECK_FAILED=1" >> "$GITHUB_ENV"
25+
fi
26+
- name: Check for remaining class="instructions" paragraphs
27+
run: |
28+
if test $(fgrep -rl 'class="instructions"' techniques/ understanding/ | grep -vc -- '-template.html$') -gt 0; then
29+
echo "::notice title=Leftover instructions paragraph in informative docs::Make sure to clean any instructions paragraphs from newly-added Techniques or Understanding pages."
30+
echo "CHECK_FAILED=1" >> "$GITHUB_ENV"
31+
fi
32+
- name: Check for changes to legacy files
33+
run: |
34+
if test $(git diff origin/${{ github.base_ref }} --numstat | egrep -c '\s(conformance-challenges|requirements|wcag20)/') -gt 0; then
35+
echo "::notice title=Legacy files modified::PRs should not change files under conformance-challenges/, requirements/, or wcag20/"
36+
echo "CHECK_FAILED=1" >> "$GITHUB_ENV"
37+
fi
38+
- name: Check for isolation of changes to TR space or informative docs
39+
run: |
40+
if test $(git diff origin/${{ github.base_ref }} --numstat | grep -c '\sguidelines/') -gt 0 &&
41+
test $(git diff origin/${{ github.base_ref }} --numstat | grep -vc '\sguidelines/') -gt 0; then
42+
echo "::notice title=Mixed TR and informative docs changes::Please submit changes to TR space separately from changes to informative docs."
43+
echo "CHECK_FAILED=1" >> "$GITHUB_ENV"
44+
fi
45+
- name: Reflect status
46+
run: |
47+
test ! $CHECK_FAILED

11ty/CustomLiquid.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ export class CustomLiquid extends Liquid {
115115
$childList = null;
116116
$tocList.append(`<li><a href="#${el.attribs.id}">${$(h2El).text()}</a></li>`);
117117
});
118-
$el.find("> h3:first-child").each((_, h3El) => {
119-
if (!$childList) $childList = $(`<ol class="toc"></ol>`).appendTo($tocList);
120-
$childList.append(`<li><a href="#${el.attribs.id}">${$(h3El).text()}</a></li>`);
121-
});
122118
});
123119

124120
return $.html();
@@ -158,6 +154,10 @@ export class CustomLiquid extends Liquid {
158154
const prependedIncludes = ["header"];
159155
const appendedIncludes = ["wai-site-footer", "site-footer"];
160156

157+
// Include draft banner at top of informative pages for GH Pages builds and PR previews
158+
if (process.env.WCAG_MODE === "editors" || (process.env.COMMIT_REF && !process.env.WCAG_MODE))
159+
prependedIncludes.unshift("draft-banner");
160+
161161
if (isUnderstanding)
162162
prependedIncludes.push(
163163
isIndex ? "understanding/navigation-index" : "understanding/navigation"

11ty/json.ts

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ import {
1313
getPrinciplesForVersion,
1414
getTermsMapForVersion,
1515
assertIsWcagVersion,
16+
getFlatGuidelines,
1617
} from "./guidelines";
17-
import { techniqueAssociationTypes, type TechniqueAssociationType } from "./techniques";
18+
import {
19+
getFlatTechniques,
20+
getTechniquesByTechnology,
21+
techniqueAssociationTypes,
22+
type Technique,
23+
type TechniqueAssociationType,
24+
} from "./techniques";
1825

1926
const altIds: Record<string, string> = {
2027
"text-alternatives": "text-equiv",
@@ -197,7 +204,10 @@ interface TechniquesSituation {
197204

198205
type TechniquesHtmlMap = Partial<Record<TechniqueAssociationType, string | TechniquesSituation[]>>;
199206

200-
async function createTechniquesHtmlFromSc(sc: SuccessCriterion) {
207+
async function createTechniquesHtmlFromSc(
208+
sc: SuccessCriterion,
209+
techniquesMap: Record<string, Technique>
210+
) {
201211
const $ = await loadFromFile(join("_site", "understanding", `${sc.id}.html`));
202212

203213
function cleanHtml($el: CheerioElement) {
@@ -236,11 +246,17 @@ async function createTechniquesHtmlFromSc(sc: SuccessCriterion) {
236246
// Make techniques links absolute
237247
// (this uses a different selector than the build process, to handle pre-built output)
238248
$section.find("[href*='/techniques/' i]").each((_, el) => {
239-
el.attribs.href = el.attribs["href"].replace(
240-
/^.*\/([\w-]+\/[^\/]+)$/,
241-
"https://www.w3.org/WAI/WCAG22/Techniques/$1"
249+
const $el = $(el);
250+
const technique = techniquesMap[$el.attr("href")!.replace(/^.*\//, "")];
251+
$el.attr(
252+
"href",
253+
$el
254+
.attr("href")!
255+
.replace(/^.*\/([\w-]+\/[^\/]+)$/, "https://www.w3.org/WAI/WCAG22/Techniques/$1")
242256
);
243-
delete el.attribs.class;
257+
$el.removeAttr("class");
258+
// Restore full title (whereas links in build output used truncatedTitle)
259+
$el.html(`${technique.id}: ${technique.title.replace(/\n\s+/g, " ")}`);
244260
});
245261

246262
// Remove superfluous subheadings/subsections, e.g. "CSS Techniques (Advisory)"
@@ -299,6 +315,9 @@ export async function generateWcagJson(version: WcagVersion) {
299315
includeSynonyms: false,
300316
stripRespec: false,
301317
});
318+
const techniquesMap = getFlatTechniques(
319+
await getTechniquesByTechnology(getFlatGuidelines(principles))
320+
);
302321

303322
function cleanLinks($: CheerioAPI) {
304323
$("a[href]").each((_, aEl) => {
@@ -337,7 +356,7 @@ export async function generateWcagJson(version: WcagVersion) {
337356
...spreadCommonProps(sc),
338357
level: sc.level,
339358
details: createDetailsFromSc(sc),
340-
techniquesHtml: await createTechniquesHtmlFromSc(sc),
359+
techniquesHtml: await createTechniquesHtmlFromSc(sc, techniquesMap),
341360
}))
342361
),
343362
}))

_includes/draft-banner.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{%- comment -%}
2+
Banner shown only on builds of informative docs for GitHub Pages.
3+
{%- endcomment -%}
4+
{%- assign pubSlug = page.url | replace: "techniques", "Techniques" | replace: "understanding", "Understanding" | replace_last: ".html", "" -%}
5+
<section class="default-grid info" aria-label="Notice">
6+
<p class="inner">
7+
This is an unpublished editor’s draft that might include content that is not finalized.
8+
<a href="https://www.w3.org/WAI/WCAG{{ version }}{{ pubSlug }}">View the published version</a>
9+
</p>
10+
</section>

errata/21.html

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,74 @@ <h3>Editorial Errata</h3>
5151
<p>No editorial errata have been recorded at present.</p>
5252
</section>
5353
</section>
54+
55+
{%- assign trDate = "2024-12-12" -%}
56+
{%- capture trUrl -%}
57+
https://www.w3.org/TR/{{ trDate | split: "-" | first }}/REC-WCAG{{ page.fileSlug }}-{{ trDate | replace: "-", "" }}/
58+
{%- endcapture -%}
59+
<section id="since-{{ trDate }}">
60+
<h2>Errata since <a href="{{ trUrl }}">{{ trDate | date: "%d %B %Y" }} Publication</a></h2>
61+
<section id="substantive-{{ trDate }}">
62+
<h3>Substantive Errata</h3>
63+
<p>No substantive errata have been recorded at present.</p>
64+
</section>
65+
<section id="editorial-{{ trDate }}">
66+
<h3>Editorial Errata</h3>
67+
<ul>
68+
<li>
69+
2025-03-20:
70+
Making editorial changes to improve consistent use of the terms
71+
"success criteria/criterion", "web", "website", and "web page"
72+
({% gh "d920ac2" %})
73+
</li>
74+
<li>
75+
2025-03-20:
76+
In the definition for <a href="{{ trUrl }}#dfn-single-pointer">single pointer</a>,
77+
updating to further enumerate interaction types and distinguish input modalities.
78+
({% gh "cec6f8e" %}, {% gh "e51f2b1" %})
79+
</li>
80+
<li>
81+
2025-03-20:
82+
In <a href="{{ trUrl }}#abstract">Abstract</a>, modifying language regarding devices.
83+
({% gh "13b37d7" %})
84+
</li>
85+
<li>
86+
2025-03-20:
87+
In the definition for <a href="{{ trUrl }}#dfn-used-in-an-unusual-or-restricted-way">used in an unusual or restricted way</a>,
88+
genericizing WCAG version reference from "2.1" to "2".
89+
({% gh "9bfa2aa" %})
90+
</li>
91+
<li>
92+
2025-03-20:
93+
Making editorial changes to improve consistent use of definitions in the success criteria
94+
({% gh "8a5e642" %}, {% gh "e3ff8cd" %})
95+
</li>
96+
</ul>
97+
</section>
98+
</section>
99+
100+
{%- assign trDate = "2023-09-21" -%}
101+
{%- capture trUrl -%}
102+
https://www.w3.org/TR/{{ trDate | split: "-" | first }}/REC-WCAG{{ page.fileSlug }}-{{ trDate | replace: "-", "" }}/
103+
{%- endcapture -%}
104+
<section id="since-{{ trDate }}">
105+
<h2>Errata since <a href="{{ trUrl }}">{{ trDate | date: "%d %B %Y" }} Publication</a></h2>
106+
<section id="substantive-{{ trDate }}">
107+
<h3>Substantive Errata</h3>
108+
<p>No substantive errata have been recorded at present.</p>
109+
</section>
110+
<section id="editorial-{{ trDate }}">
111+
<h3>Editorial Errata</h3>
112+
<ul>
113+
<li>
114+
2024-11-19:
115+
In <a href="{{ trUrl }}#input-purposes">7. Input Purposes for User Interface Components</a>,
116+
correcting the word <span lang="fr">"dissement"</span> to <span lang="fr">"arrondissement"</span>.
117+
({% gh "2dd3043" %})
118+
</li>
119+
</ul>
120+
</section>
121+
</section>
54122

55123
{%- assign trDate = "2018-06-05" -%}
56124
{%- capture trUrl -%}

guidelines/act-mapping.json

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,45 @@
14011401
}
14021402
}
14031403
},
1404+
{
1405+
"title": "Orientation of the page is not restricted using CSS transforms",
1406+
"permalink": "/standards-guidelines/act/rules/b33eff/",
1407+
"successCriteria": [
1408+
"orientation"
1409+
],
1410+
"wcagTechniques": [],
1411+
"deprecated": false,
1412+
"proposed": false,
1413+
"frontmatter": {
1414+
"id": "b33eff",
1415+
"name": "Orientation of the page is not restricted using CSS transforms",
1416+
"rules_format": 1.1,
1417+
"rule_type": "atomic",
1418+
"description": "This rule checks that page content is not restricted to either `landscape` or `portrait` orientation using CSS transforms.\n",
1419+
"accessibility_requirements": {
1420+
"wcag21:1.3.4": {
1421+
"forConformance": true,
1422+
"failed": "not satisfied",
1423+
"passed": "further testing needed",
1424+
"inapplicable": "further testing needed"
1425+
}
1426+
},
1427+
"input_aspects": [
1428+
"DOM Tree",
1429+
"CSS Styling"
1430+
],
1431+
"acknowledgments": {
1432+
"authors": [
1433+
"Audrey Maniez",
1434+
"Jey Nandakumar",
1435+
"Tom Brunet"
1436+
],
1437+
"funding": [
1438+
"WAI-Tools"
1439+
]
1440+
}
1441+
}
1442+
},
14041443
{
14051444
"title": "Role attribute has valid value",
14061445
"permalink": "/standards-guidelines/act/rules/674b10/",
@@ -1744,7 +1783,7 @@
17441783
"name": "ARIA required owned elements",
17451784
"rules_format": 1.1,
17461785
"rule_type": "atomic",
1747-
"description": "This rule checks that an element with an explicit role that restricts which elements it can own only owns such elements.\n",
1786+
"description": "This rule checks that an element with a semantic role that restricts which elements it can own only owns such elements.\n",
17481787
"accessibility_requirements": {
17491788
"wcag20:1.3.1": {
17501789
"forConformance": true,
@@ -2888,7 +2927,7 @@
28882927
"description": "This rule checks that each heading has a non-empty accessible name.\n",
28892928
"accessibility_requirements": {
28902929
"aria12:namecalculation": {
2891-
"title": "ARIA 1.2,5.2.8 Accessible Name Calculation",
2930+
"title": "ARIA 1.2, 5.2.8 Accessible Name Calculation",
28922931
"forConformance": true,
28932932
"failed": "not satisfied",
28942933
"passed": "further testing needed",
@@ -3550,45 +3589,6 @@
35503589
}
35513590
}
35523591
},
3553-
{
3554-
"title": "Orientation of the page is not restricted using CSS transforms",
3555-
"permalink": "/standards-guidelines/act/rules/b33eff/proposed/",
3556-
"successCriteria": [
3557-
"orientation"
3558-
],
3559-
"wcagTechniques": [],
3560-
"deprecated": false,
3561-
"proposed": true,
3562-
"frontmatter": {
3563-
"id": "b33eff",
3564-
"name": "Orientation of the page is not restricted using CSS transforms",
3565-
"rules_format": 1.1,
3566-
"rule_type": "atomic",
3567-
"description": "This rule checks that page content is not restricted to either `landscape` or `portrait` orientation using CSS transforms\n",
3568-
"accessibility_requirements": {
3569-
"wcag21:1.3.4": {
3570-
"forConformance": true,
3571-
"failed": "not satisfied",
3572-
"passed": "further testing needed",
3573-
"inapplicable": "further testing needed"
3574-
}
3575-
},
3576-
"input_aspects": [
3577-
"DOM Tree",
3578-
"CSS Styling"
3579-
],
3580-
"acknowledgments": {
3581-
"authors": [
3582-
"Audrey Maniez",
3583-
"Jey Nandakumar",
3584-
"Tom Brunet"
3585-
],
3586-
"funding": [
3587-
"WAI-Tools"
3588-
]
3589-
}
3590-
}
3591-
},
35923592
{
35933593
"title": "Summary element has non-empty accessible name",
35943594
"permalink": "/standards-guidelines/act/rules/2t702h/proposed/",

guidelines/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h3>Background on WCAG 2</h3>
3232
<p>Web Content Accessibility Guidelines (WCAG) 2.2 defines how to make web content more accessible to people with disabilities. Accessibility involves a wide range of disabilities, including visual, auditory, physical, speech, cognitive, language, learning, and neurological disabilities. Although these guidelines cover a wide range of issues, they are not able to address the needs of people with all types, degrees, and combinations of disability. These guidelines also make web content more usable by older individuals with changing abilities due to aging and often improve usability for users in general.</p>
3333
<p>WCAG 2.2 is developed through the <a href="https://www.w3.org/WAI/standards-guidelines/w3c-process/">W3C process</a> in cooperation with individuals and organizations around the world, with a goal of providing a shared standard for web content accessibility that meets the needs of individuals, organizations, and governments internationally. WCAG 2.2 builds on WCAG 2.0 [[WCAG20]] and WCAG 2.1 [[WCAG21]], which in turn built on WCAG 1.0 [[WAI-WEBCONTENT]] and is designed to apply broadly to different web technologies now and in the future, and to be testable with a combination of automated testing and human evaluation. For an introduction to WCAG, see the <a href="https://www.w3.org/WAI/standards-guidelines/wcag/">Web Content Accessibility Guidelines (WCAG) Overview</a>.</p>
3434

35-
<p>Significant challenges were encountered in defining additional criteria to address cognitive, language, and learning disabilities, including a short timeline for development as well as challenges in reaching consensus on testability, implementability, and international considerations of proposals. Work will carry on in this area in future versions of WCAG. We encourage authors to refer to our supplemental guidance on <a href="https://www.w3.org/WAI/standards-guidelines/wcag/#supplement">improving inclusion for people with disabilities, including learning and cognitive disabilities, people with low-vision, and more</a>.</p>
35+
<p>Significant challenges were encountered in defining additional criteria to address cognitive, language, and learning disabilities, including a short timeline for development as well as challenges in reaching consensus on testability, implementability, and international considerations of proposals. Work will carry on in this area in future versions of WCAG. We encourage authors to refer to our <a href="https://www.w3.org/WAI/WCAG2/supplemental/about/">supplemental guidance on improving inclusion</a> for people with disabilities, including cognitive and learning disabilities, low vision, and more.</p>
3636

3737
<p>Web accessibility depends not only on accessible content but also on accessible web browsers and other user agents. Authoring tools also have an important role in web accessibility. For an overview of how these components of web development and interaction work together, see:</p>
3838
<ul>
@@ -759,10 +759,10 @@ <h1>Glossary</h1>
759759
<dt data-include="terms/20/user-agent.html" data-include-replace="true"></dt>
760760

761761
<dt data-include="terms/20/user-controllable.html" data-include-replace="true"></dt>
762-
763-
<dt data-include="terms/20/user-interface-component.html" data-include-replace="true"></dt>
764762

765763
<dt data-include="terms/21/user-inactivity.html" data-include-replace="true"></dt>
764+
765+
<dt data-include="terms/20/user-interface-component.html" data-include-replace="true"></dt>
766766

767767
<dt data-include="terms/20/video.html" data-include-replace="true"></dt>
768768

guidelines/sc/22/consistent-help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h4>Consistent Help</h4>
1515
</ul>
1616

1717
<p class="note">Help mechanisms may be provided directly on the page, or may be provided via a direct link to a different page containing the information.</p>
18-
<p class="note">For this success criterion, "the same order relative to other page content" can be thought of as how the content is ordered when the page is serialized. The visual position of a help mechanism is likely to be consistent across pages for the same page variation (e.g., CSS break-point). The user can initiate a change, such as changing the page's zoom or orientation, which may trigger a different page variation. This criterion is concerned with relative order across pages displayed in the same page variation (e.g., same zoom level and orientation).</p>
18+
<p class="note">For this success criterion, "the same order relative to other page content" can be thought of as how the content is ordered when the page is serialized. The visual position of a help mechanism is likely to be consistent across pages for the same page variation (e.g., CSS breakpoint). The user can initiate a change, such as changing the page's zoom or orientation, which may trigger a different page variation. This criterion is concerned with relative order across pages displayed in the same page variation (e.g., same zoom level and orientation).</p>
1919

2020
</section>
2121

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<dt><dfn id="dfn-motion-animation">motion animation</dfn></dt>
22
<dd>
3-
43
<p>addition of steps between conditions to create the illusion of movement or to give a sense of a smooth transition</p>
5-
<aside class="example"><p>For example, an element which moves into place or changes size while appearing is considered to be animated. An element which appears instantly without transitioning is not using animation. Motion animation does not include changes of color, blurring, or opacity which do not change the perceived size, shape, or position of the element.</p></aside>
6-
4+
<aside class="example"><p>For example, an element which moves into place or changes size while appearing is considered to be animated. An element which appears or changes instantly, without transition/animation steps, is not using animation.</p><p>Motion animation does not include changes – such as changes of color or opacity – that do not alter the perceived size, shape, position, or distance/depth of the element to the viewer.</p></aside>
75
</dd>

0 commit comments

Comments
 (0)