Skip to content

Add pa11y-ci for accesibility linting #1046

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

Draft
wants to merge 61 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
b016436
Add pa11y-ci for accesibility linting
TrialDragon Feb 22, 2024
0ada9bd
Fix typo in ci.yml
TrialDragon Feb 22, 2024
fd574b3
Add installing zola to ci.yml
TrialDragon Feb 22, 2024
4f1a3c7
Try to make Zola run in background
TrialDragon Feb 22, 2024
64a60ba
Try to make Zola run in background, again
TrialDragon Feb 22, 2024
6afe97a
Try to make this work
TrialDragon Feb 22, 2024
0eea106
Try to make this work, again
TrialDragon Feb 22, 2024
dafbcba
Run puppeteer install.js in ci.yml
TrialDragon Feb 22, 2024
bff0dbb
Update .github/workflows/ci.yml
TrialDragon Feb 22, 2024
f43de95
Change name of pa11y-ci job to more appropriate accessibility-linting
TrialDragon Feb 22, 2024
b86b3ee
Enable echo to recognize backslashes
TrialDragon Feb 22, 2024
704b537
Switch chromium installation to apt
TrialDragon Feb 22, 2024
fd6de52
Fix package name typo
TrialDragon Feb 22, 2024
0260118
Remove generated files dependency
TrialDragon Feb 22, 2024
e5aaed0
Add assets placeholder
TrialDragon Feb 26, 2024
d60bec0
Merge branch 'main' into 396_add_accesibility_lints_to_ci
TrialDragon Feb 26, 2024
134c9a3
Add examples placeholder
TrialDragon Feb 26, 2024
81b9fcf
Fix indentation
TrialDragon Feb 27, 2024
41efe5d
Fix typos indentation
TrialDragon Feb 27, 2024
fee9f06
Fix assets indentation
TrialDragon Feb 27, 2024
3c1fd85
Fix mkdir in example dummy pages
TrialDragon Feb 27, 2024
a5c35b4
Fix directory name
TrialDragon Feb 27, 2024
97b0ba4
Restore dummy example code
TrialDragon Feb 27, 2024
a6ef82c
Merge branch 'main' into 396_add_accesibility_lints_to_ci
TrialDragon Feb 27, 2024
3b1d260
Fix the typo
TrialDragon Feb 27, 2024
44f801b
Add community dummy pages
TrialDragon Feb 27, 2024
78fd2a0
Fix missing quote mark
TrialDragon Feb 27, 2024
73cad26
Add sponsor link to donate dummy page
TrialDragon Feb 27, 2024
f4c228d
Add dummy errors page
TrialDragon Feb 27, 2024
f7e5a77
Fix typo
TrialDragon Feb 27, 2024
ba4b757
Add missing back ticks
TrialDragon Feb 27, 2024
3b355bb
Cleanup some of the dummy files
TrialDragon Feb 27, 2024
e036f5f
Merge branch 'main' into 396_add_accesibility_lints_to_ci
TrialDragon Mar 1, 2024
aa5545e
Make assets page accessible
TrialDragon Mar 1, 2024
57b28b0
Fix conflicting id issue in dummy pages
TrialDragon Mar 1, 2024
202afb1
Exclude github from accessibility linting
TrialDragon Mar 1, 2024
1fc2ebe
Try to exclude github again
TrialDragon Mar 1, 2024
a454790
Revert "Try to exclude github again"
TrialDragon Mar 1, 2024
f0101a6
Revert "Exclude github from accessibility linting"
TrialDragon Mar 1, 2024
38af6e1
Fix examples issues
TrialDragon Mar 1, 2024
873e5da
Remove github faq from accessibility linting
TrialDragon Mar 1, 2024
7174b69
Fix docs footer contrast
TrialDragon Mar 2, 2024
70af105
Make migration area tag higher contrast
TrialDragon Mar 2, 2024
13c02a0
Make diffs contrasting
TrialDragon Mar 2, 2024
f001207
Make anchor links higher contrast
TrialDragon Mar 2, 2024
ffc1326
Fix improper formatting
TrialDragon Mar 2, 2024
3c8e230
Add 0.10 news bloom image alternative text
TrialDragon Mar 2, 2024
92e65d5
Try to fix errors page
TrialDragon Mar 2, 2024
0daf2c0
Add alternative text to Bevy logo
TrialDragon Mar 2, 2024
266916f
Make "illegal" code contrasting
TrialDragon Mar 2, 2024
1de2b7a
Add more missing alternative texts
TrialDragon Mar 2, 2024
adf2989
Make `generate-*` and build-website need accesibility linting
TrialDragon Mar 3, 2024
18f945d
Merge branch 'main' into 396_add_accesibility_lints_to_ci
TrialDragon Mar 11, 2024
4508f60
Merge branch 'main' into 396_add_accesibility_lints_to_ci
TrialDragon May 2, 2025
0e54677
Add newlines for CI
TrialDragon May 2, 2025
242242c
make dummy example work?
TrialDragon May 2, 2025
15c5914
Fix dummy errors page?
TrialDragon May 2, 2025
aeaa32c
Remove dummy pages
TrialDragon May 2, 2025
720fb5d
put the needs on the right thing
TrialDragon May 2, 2025
e68cb04
Fix CI
TrialDragon May 2, 2025
ec22463
Fix accessibility CI requirements
TrialDragon May 2, 2025
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
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,41 @@ jobs:

- name: Check clippy
run: cargo clippy --workspace -- -Dwarnings

accessibility-linting:
needs: [generate-errors, generate-wasm-examples, generate-community, generate-assets]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install NPM
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Google Chrome
run: |
sudo apt-get install -y chromium-browser
which chromium-browser
chromium-browser --version

- name: Install Zola
uses: taiki-e/install-action@v2
with:
tool: [email protected]

- name: Install Pa11y-CI and Wait-on
run: |
npm install pa11y-ci wait-on
node node_modules/puppeteer/install.js

- name: Run Pa11y-CI
run: |
echo -e "{\n \"defaults\": {\n \"chromeLaunchConfig\": {\n \"executablePath\": \"/usr/bin/chromium-browser\"\n }\n }\n}" > .pa11yci
zola serve &
npx wait-on http://127.0.0.1:1111
npx pa11y-ci --sitemap http://127.0.0.1:1111/sitemap.xml --sitemap-exclude 'faq'

typos:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion content/learn/migration-guides/0.12-to-0.13.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ This means users who want to migrate their .meta files will have to add the `inc
</div>

- For `add_texture` you need to wrap your `AssetId` in `Some`
- `finish` now returns the atlas texture image directly instead of a handle. Provide the atlas texture to `add` on Assets<Texture> to get a Handle<Image>
- `finish` now returns the atlas texture image directly instead of a handle. Provide the atlas texture to `add` on `Assets<Texture>` to get a `Handle<Image>`

### [Remove the ability to ignore global volume](https://github.com/bevyengine/bevy/pull/11092)

Expand Down
2 changes: 1 addition & 1 deletion content/news/2020-08-10-introducing-bevy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1197,4 +1197,4 @@ If any of this sounds interesting to you, I encourage you to check out [Bevy on

I want Bevy to become a vibrant developer community ... thats actually why I chose the name! A Bevy is a group of birds, just like we are a group of game developers. Join the Bevy!

<img src="/assets/bevy_logo_dark.svg" style="height: 4.0rem; margin-top: 2.0rem" class="invertable"/>
<img src="/assets/bevy_logo_dark.svg" alt="The Bevy logo" style="height: 4.0rem; margin-top: 2.0rem" class="invertable"/>
16 changes: 8 additions & 8 deletions content/news/2020-08-19-scaling-bevy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@ First, I want to take a moment to highlight just how wild the last week has been
<div style="display: flex; flex-wrap: wrap; width: 100%">
<div style="max-width: 30rem; max-height: 15rem; margin-right: 3rem; margin-bottom: 3rem">
<h4> 3rd most popular /r/rust post <i>of all time</i></h4>
<img src="3rd_on_reddit.png" style="display: block; height: 13rem"/>
<img src="3rd_on_reddit.png" alt="The Introducing Bevy article at third place in Reddit's top rankings" style="display: block; height: 13rem"/>
</div>
<div style="max-width: 30rem; max-height: 15rem; margin-right: 3rem; margin-bottom: 3rem">
<h4>#2 on Hacker News</h4>
<img src="2nd_on_hacker_news.png" style="display: block; height: 10rem"/>
<img src="2nd_on_hacker_news.png" alt="The Introducing Bevy article at second place on Hacker News' top stories" style="display: block; height: 10rem"/>
</div>
<div style="max-width: 20rem; max-height: 15rem; margin-right: 3rem; margin-bottom: 3rem">
<h4>2,200 GitHub Stars</h4>
<img src="2_2k_stars.png" style="display: block; height: 3rem"/>
<h4>2,200 Github Stars</h4>
<img src="2_2k_stars.png" alt="A star with the word 'unstar' next to it and a counter saying 2.2k to the right" style="display: block; height: 3rem"/>
</div>
<div style="max-width: 20rem; max-height: 15rem; margin-right: 3rem; margin-bottom: 3rem">
<h4>26 contributors</h4>
<img src="contributors.png" style="display: block; height: 8rem"/>
<img src="contributors.png" alt="A list of Bevy engine contributors profile pictures and the number 26" style="display: block; height: 8rem"/>
</div>
<div style="max-width: 20rem; max-height: 15rem; margin-right: 3rem; margin-bottom: 3rem">
<h4>644 Discord Users</h4>
<img src="discord_users.png" style="display: block; height: 6rem"/>
<img src="discord_users.png" alt="Text saying "Server members" and 644 members from Discord" style="display: block; height: 6rem"/>
</div>
<div style="max-width: 21rem; max-height: 15rem; margin-right: 3rem; margin-bottom: 3rem">
<h4 style="text-align: center"><a href="https://github.com/sponsors/cart">37% of the way to making my full time Bevy development sustainable</a></h4>
<a href="https://github.com/sponsors/cart"><img src="funding.png" style="display: block; height: 6rem"/></a>
<a href="https://github.com/sponsors/cart"><img src="funding.png" alt="The GitHub sponsors page for cart where you can donate to him" style="display: block; height: 6rem"/></a>
</div>
<div style="max-width: 35rem; margin-right: 3rem; margin-bottom: 3rem">
<h3 style="text-align: center;"><a href="https://github.com/bevyengine/awesome-bevy">A truly awesome number of community-developed plugins, games, and apps</a></h3>
<a href="https://github.com/bevyengine/awesome-bevy"><img src="awesome.png" style="display: block; height: 20rem"/></a>
<a href="https://github.com/bevyengine/awesome-bevy"><img src="awesome.png" alt="A page of awesome creations made with Bevy" style="display: block; height: 20rem"/></a>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion content/news/2020-11-03-bevy-0.3/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This was a massive group effort that spanned multiple projects:

Bevy can now run on iOS!

<img src="ios.png" style="margin-left: -4rem; margin-bottom: -5rem; margin-top: -3rem" />
<img src="ios.png" alt="A beige cube on a green plane running on an iOS emulator" style="margin-left: -4rem; margin-bottom: -5rem; margin-top: -3rem" />

You can try out the [Bevy iOS example](https://github.com/bevyengine/bevy/tree/v0.3.0/examples/ios) by following the [instructions here](https://github.com/bevyengine/bevy/tree/v0.3.0/examples#ios). This one is also hot off the presses: some features will work and others probably won't.

Expand Down
2 changes: 1 addition & 1 deletion content/news/2021-08-10-bevys-first-birthday/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ I'm looking forward to spending the next year with you all!

\- [@cart](https://github.com/cart/)

<img src="/assets/bevy_logo_dark.svg" style="height: 4.0rem; margin-top: 1.5rem" class="invertable"/>
<img src="/assets/bevy_logo_dark.svg" alt="The Bevy logo" style="height: 4.0rem; margin-top: 1.5rem" class="invertable"/>
2 changes: 1 addition & 1 deletion content/news/2022-08-10-bevys-second-birthday/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ This year is going to be a big one for Bevy. I'm looking forward to spending it

\- [@cart](https://github.com/cart/)

<img src="/assets/bevy_logo_dark.svg" style="height: 4.0rem; margin-top: 1.5rem" class="invertable" />
<img src="/assets/bevy_logo_dark.svg" alt="The Bevy logo" style="height: 4.0rem; margin-top: 1.5rem" class="invertable" />
12 changes: 6 additions & 6 deletions content/news/2023-03-06-bevy-0.10/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,27 +606,27 @@ let's double the `emissive` value of each cube.
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); grid-gap: 16px;">
<div style="position: relative;">
<div style="position: absolute; top: 0; left: 0; background-color: black; color: white; border-radius: 10px 0 10px 0; width: 30px; height: 30px; padding: 2px; box-shadow: 2px 2px 4px rgba(0,0,0,0.3); text-align: center; opacity: 0.8;">1</div>
<img src="old_bloom.png" style="width: 100%; height: auto;"/>
<img src="old_bloom.png" alt="First image of bloom; from Bevy 0.9" style="width: 100%; height: auto;" />
</div>
<div style="position: relative;">
<div style="position: absolute; top: 0; left: 0; background-color: black; color: white; border-radius: 10px 0 10px 0; width: 30px; height: 30px; padding: 2px; box-shadow: 2px 2px 4px rgba(0,0,0,0.3); text-align: center; opacity: 0.8;">2</div>
<img src="old_bloom_aces.png" style="width: 100%; height: auto;"/>
<img src="old_bloom_aces.png" alt="Second image of bloom; from Bevy 0.9 with a tonemapper" style="width: 100%; height: auto;"/>
</div>
<div style="position: relative;">
<div style="position: absolute; top: 0; left: 0; background-color: black; color: white; border-radius: 10px 0 10px 0; width: 30px; height: 30px; padding: 2px; box-shadow: 2px 2px 4px rgba(0,0,0,0.3); text-align: center; opacity: 0.8;">3</div>
<img src="new_bloom.png" style="width: 100%; height: auto;"/>
<img src="new_bloom.png" alt="Third image of bloom; from Bevy 0.10" style="width: 100%; height: auto;"/>
</div>
<div style="position: relative;">
<div style="position: absolute; top: 0; left: 0; background-color: black; color: white; border-radius: 10px 0 10px 0; width: 30px; height: 30px; padding: 2px; box-shadow: 2px 2px 4px rgba(0,0,0,0.3); text-align: center; opacity: 0.8;">4</div>
<img src="new_bloom_double_emission.png" style="width: 100%; height: auto;"/>
<img src="new_bloom_double_emission.png" alt="Fourth image of bloom; from Bevy 0.10 with doubled emissive values" style="width: 100%; height: auto;"/>
</div>
<div style="position: relative;">
<div style="position: absolute; top: 0; left: 0; background-color: black; color: white; border-radius: 10px 0 10px 0; width: 30px; height: 30px; padding: 2px; box-shadow: 2px 2px 4px rgba(0,0,0,0.3); text-align: center; opacity: 0.8;">5</div>
<img src="new_bloom_additive.png" style="width: 100%; height: auto;"/>
<img src="new_bloom_additive.png" alt="Fifth image of bloom; from Bevy 0.10 with additive compositing" style="width: 100%; height: auto;"/>
</div>
<div style="position: relative;">
<div style="position: absolute; top: 0; left: 0; background-color: black; color: white; border-radius: 10px 0 10px 0; width: 30px; height: 30px; padding: 2px; box-shadow: 2px 2px 4px rgba(0,0,0,0.3); text-align: center; opacity: 0.8;">6</div>
<img src="bloom_example.png" style="width: 100%; height: auto;"/>
<img src="bloom_example.png" alt="The Bevy bloom 3D example" style="width: 100%; height: auto;"/>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion content/news/2023-08-10-bevys-third-birthday/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,4 @@ I'm looking forward to spending another year building Bevy with you all!

\- [@cart](https://github.com/cart/)

<img src="/assets/bevy_logo_dark.svg" style="height: 4.0rem; margin-top: 1.5rem" class="invertable" />
<img src="/assets/bevy_logo_dark.svg" alt="The Bevy logo" style="height: 4.0rem; margin-top: 1.5rem" class="invertable" />
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ Here is to another year of Bevy!

\- [@cart](https://github.com/cart/)

<img src="/assets/bevy_logo_dark.svg" style="height: 4.0rem; margin-top: 1.5rem" class="invertable"/>
<img src="/assets/bevy_logo_dark.svg" alt="The Bevy logo" style="height: 4.0rem; margin-top: 1.5rem" class="invertable"/>
4 changes: 2 additions & 2 deletions sass/_utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ body:not(.show_drafts) .public_draft:not(.active_draft) {
display: none !important;
}

.public_draft > div > a {
.public_draft>div>a {
color: var(--warning-color) !important;
}

Expand Down Expand Up @@ -63,7 +63,7 @@ h6 {
}
}

.public_draft > div > a {
.public_draft>div>a {
color: var(--warning-color) !important;
}

Expand Down
1 change: 1 addition & 0 deletions sass/components/_syntax-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ div.incorrect-image {

.z-meta.z-annotation.z-parameters.z-rust,
.z-variable.z-function.z-rust {

.z-begin,
.z-end,
.z-punctuation {
Expand Down
3 changes: 2 additions & 1 deletion sass/pages/_migration_guide.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.migration-guide {

h1,
h2,
h3 {
Expand All @@ -13,7 +14,7 @@
}
}

h2 + h3 {
h2+h3 {
margin-top: 0;
padding-top: 0;
border-top: 0;
Expand Down
5 changes: 3 additions & 2 deletions templates/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
<input class="assets-search__input"
type="text"
id="assets-search"
placeholder="Search (ie: 0.15 MIT)">
placeholder="Search (ie: 0.16 MIT)"
aria-label="Search (ie: 0.16 MIT)" />
</div>
<div class="assets-filters">
<label>Bevy last supported version</label>
<label for="assets-filter">Bevy last supported version</label>
<select class="asset-version-select" id="assets-filter">
<option value="all_versions">All</option>
</select>
Expand Down
3 changes: 2 additions & 1 deletion templates/layouts/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<input class="assets-search__input"
type="text"
id="assets-search"
placeholder="Search Example">
placeholder="Search Example"
aria-label="Search Example" />
</div>
{% for subsection in section.subsections %}
{% set section = get_section(path=subsection) %}
Expand Down
Loading