Skip to content

Commit

Permalink
Replace aria-practices.html with a new content tree and move examples…
Browse files Browse the repository at this point in the history
… into the patterns branch of the tree (pull #2417)

This commit makes the following changes:
- Moves the HTML source for each pattern from a section in /aria-practices.html into its own file in a directory for the pattern, e.g., `patterns/button/button-pattern.html`.
- moves all example files from the /examples directory into an examples subdirectory under its associated pattern, e.g., `patterns/button/examples/button.html`.
- Moves the HTML source for each practice from a section in /aria-practices.html into its own file in a directory for the practice, e.g., `practices/grid-and-table-properties/grid-and-table-properties-practice.html`
- Moves the HTML source for each section of the about page from a section in /aria-practices.html into `about/about.html`.
- Renames HTML files that were named "index.html" to a more appropriate name, except for the page that serves as the index.
- For consistency, removes a superfluous directory from the path for two of the tree view examples.
- Makes link text more consistent, e.g., links to patterns no longer contain the word "design".
- Makes styling for warnings, advisories, and notes more consistent.
- Removes dependencies on respec for resolution of links to external resources, such as the ARIA specification.
- Revises GitHub workflows and supporting scripts to support the new content structure.

Co-authored-by: JaEun Jemma Ku <[email protected]>
Co-authored-by: alflennik <[email protected]>
Co-authored-by: Nick Schonning <[email protected]>
Co-authored-by: Sarah Higley <[email protected]>
Co-authored-by: Jon Gunderson <[email protected]>
  • Loading branch information
6 people authored Dec 7, 2022
1 parent d7db313 commit ae779f3
Show file tree
Hide file tree
Showing 453 changed files with 33,285 additions and 35,643 deletions.
6 changes: 3 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
**/*.min.js
common/
examples/landmarks/js/visua11y.js
examples/js/highlight.pack.js
examples/js/skipto.js
content/patterns/landmarks/examples/js/visua11y.js
content/shared/js/highlight.pack.js
content/shared/js/skipto.js
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
"strict": 0,
"no-unused-vars": ["error", { "varsIgnorePattern": "SkipToConfig" }]
}
},
{
"files": [ "content/shared/js/app.js" ],
"parserOptions": { "ecmaVersion": 11 }
},
{
"files": [ "content/shared/js/specLinks.mjs" ],
"parserOptions": { "sourceType": "module" }
}
]
}
4 changes: 2 additions & 2 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Regression Tests Coverage Report
on:
pull_request_target:
paths:
- "examples/**"
- "content/**/examples/**"
- "test/**"
- "!examples/landmarks/**"
- "!content/landmarks/examples/**"

permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
paths:
- "package*.json"
- ".github/workflows/examples.yml"
- "examples/**"
- "content/**/examples/**"
- "scripts/reference-tables.*"
pull_request:
paths:
- "package*.json"
- ".github/workflows/examples.yml"
- "examples/**"
- "content/**/examples/**"
- "scripts/reference-tables.*"

jobs:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Link Checker

on: [push, pull_request]

jobs:
link-checker:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
cache: npm

- name: Install npm dependencies
run: npm ci

- name: Run link checker
run: npm run link-checker
10 changes: 4 additions & 6 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ on:
- ".github/workflows/regression.yml"
- "package*.json"
- "test/**"
- "examples/**"
- "!examples/landmarks/**"
- "!examples/coding-template/**"
- "content/**/examples/**"
- "!content/landmarks/examples/**"
push:
branches-ignore:
- main
Expand All @@ -17,9 +16,8 @@ on:
- ".github/workflows/regression.yml"
- "package*.json"
- "test/**"
- "examples/**"
- "!examples/landmarks/**"
- "!examples/coding-template/**"
- "content/**/examples/**"
- "!content/landmarks/examples/**"

jobs:
regression:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
- "!**/*.min.js"
- "!**/*.pack.js"
- "!**/*.paint"
- "!aria-practices-DeletedSectionsArchive.html"
- "!examples/landmarks/css/bootstrap.css"
- "!content/patterns/landmarks/examples/css/bootstrap.css"
- "!common/**"
- "!respec-config.js"

Expand All @@ -20,8 +19,7 @@ on:
- "!**/*.min.js"
- "!**/*.pack.js"
- "!**/*.paint"
- "!aria-practices-DeletedSectionsArchive.html"
- "!examples/landmarks/css/bootstrap.css"
- "!content/patterns/landmarks/examples/css/bootstrap.css"
- "!common/**"
- "!respec-config.js"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wai-trigger-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths:
- ".github/workflows/wai-trigger-deploy.yml"
- "common/**"
- "examples/**"
- "content/**/examples/**"
- "img/**"
- "aria-practices.html"
- "index.html"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wai-trigger-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:
- "scripts/reference-tables.*"
- "**/*.js"
- "test/**"
- "examples/**"
- "content/**/examples/**"
- "aria-practices.html"
- "index.html"
- "!examples/landmarks/**"
- "!examples/coding-template/**"
- "!content/landmarks/examples/**"
- "!coding-template/**"
- "!common/**"

jobs:
Expand Down
19 changes: 19 additions & 0 deletions .link-checker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
filesToIgnore: ['content/shared/templates/example-usage-warning.html'],
excludedLinks: {
'content/patterns/menubar/examples/menubar-navigation.html': [
'#ex1 [role=menuitem]',
],
'content/patterns/treeview/examples/treeview-navigation.html': [
'#ex1 [role=treeitem]',
],
'content/patterns/carousel/examples/carousel-2-tablist.html': [
'.carousel-image a',
],
},
ignoreHashesOnExternalPagesMatchingRegex: [
// Some hash links are resolved with JS and are therefore difficult to check algorithmically
/^https:\/\/github\.com\/.*\/wiki\//,
/^https:\/\/html\.spec\.whatwg\.org\/multipage\//,
],
};
Loading

0 comments on commit ae779f3

Please sign in to comment.