forked from ScottLogic/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
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
GitHub Action: runs Axe accessibility tests on changed files #5
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jcarstairs-scottlogic
force-pushed
the
pa11y-ci
branch
18 times, most recently
from
November 29, 2023 14:05
1df5653
to
9374fb1
Compare
jcarstairs-scottlogic
force-pushed
the
pa11y-ci
branch
5 times, most recently
from
November 29, 2023 14:42
7c0a32c
to
ae028b8
Compare
ithake
reviewed
Nov 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also suggest an update to a readme of some kind to mention the new functionality.
Incidentally +1 for moving the logic out of ruby and into javascript to avoid the need for an unsafe plugin! |
ithake
reviewed
Nov 29, 2023
jcarstairs-scottlogic
force-pushed
the
pa11y-ci
branch
from
November 30, 2023 17:19
daf5837
to
fe48cd9
Compare
jcarstairs-scottlogic
force-pushed
the
pa11y-ci
branch
from
November 30, 2023 17:31
fe48cd9
to
6845afe
Compare
…#136) * Add personal profile * Added conscientious consumption blog post * Add strong emphasis to numbers and equations * Add abbreviations * Few more abbreviations and a link to Intel PCM * Changes from feedback by Olly and Asim Hussain * Use h2 headers and update date
…mption Of Hardware and 4 other files
jcarstairs-scottlogic
force-pushed
the
gh-pages
branch
from
December 8, 2023 10:44
d060e91
to
fe1f5fe
Compare
…ce (ScottLogic#124) * refactor: include author-link.html - pass in author id to reduce boiler plate. * refactor: includes author-link.html author-summary.html - author-link: created to reduce boilerplate. - author-summary: pass in author-id - default_post: remove whitespace before comma in list of contributors --------- Co-authored-by: Ian Thake <[email protected]>
…colour contrast ratio (ScottLogic#131) * Updates node-sass -> dart-sass * Pulls out colours to separate file * Fixes grey text colour contrast ratio
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a GitHub Action to check for low-hanging accessibility problems in new blog posts. Here's an example workflow showing the tests running and failing because of accessibility issues.
To be more precise, the Action uses the pa11y-ci command-line interface to run the Axe accessibility checks against a list of new or changed pages.
I've written a bash script to calculate the URLs of the pages which have changed, which won't catch all changes, but will catch the vast majority in a way which is both simple and compute-cheap, and in particular will catch new blog posts.
The Action is triggered by Pull Requests and pushes to
gh-pages
.Running the tests only against the changed pages is quicker and uses less compute. To figure out which pages have changed in a way which is fairly simple and doesn't require too much compute, I've written a script, generate_pa11y_ci_urls_from_git_diff, which calculates the relative URLs of the pages which have changed given a Git diff against a provided base. This approach misses out on pages which have changed as a result of changes to Jekyll layouts and includes, but since the vast majority of changes are new blog posts, this approach should be good enough.
Since colour contrast is a known issue, I've configured aXe to ignore colour contrast issues.