Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accessibility test Kitchen Sink with Playwright (#1260)
* Add core-js so dev build works Install pytest-playwright and (npm) axe-core Write test that scans admonitions with Axe How to run test: nox -s compile nox -s docs python -m http.server -d docs/_build/html/ nox -s test -- -k accessibility * add more pages, test server * add documentation * add prerequisites to nox test * update package-lock.json via stb * update package-lock.json via nox -s compile * streamline, update docs * typo * sync lockfile (remove core-js) * Update tests/utils.py Co-authored-by: Daniel McCloy <dan@mccloy.info> * Update tests/README.md Co-authored-by: Tania Allard <taniar.allard@gmail.com> * Update docs/community/topics/accessibility.md Co-authored-by: Tania Allard <taniar.allard@gmail.com> * Update tests/README.md Co-authored-by: Tania Allard <taniar.allard@gmail.com> * Update tests/utils.py Co-authored-by: Tania Allard <taniar.allard@gmail.com> * Update tests/utils.py Co-authored-by: Tania Allard <taniar.allard@gmail.com> * - nox session a11y - add pytest-base-url plugin - push more test setup into page fixture - add license header to pretty_axe_results - move pretty_axe_results and check_warnings to utils/ * update docs * uncomment commented-out tests * regenerate package-lock.json via: rm package-lock.json rm -r node_modules stb npm install --include=dev * oops finish updating tests * do not include a11y tests in main test session * remove redundant decorator * Update tests/README.md Co-authored-by: Daniel McCloy <dan@mccloy.info> * Update tests/README.md Co-authored-by: Daniel McCloy <dan@mccloy.info> * Update tests/README.md Co-authored-by: Tania Allard <taniar.allard@gmail.com> * Remove base-url Pytest plugin * Update tests/utils/pretty_axe_results.py Co-authored-by: Tania Allard <taniar.allard@gmail.com> * Apply suggestions from code review Co-authored-by: Tania Allard <taniar.allard@gmail.com> * fix pretty_axe_results * Generate each test run from parameters * remove unused marker url_path * undo multiline * update doc string * Add CI check for --with-deps suggested by Tony * oops, rm extra playwright install line * update comment * update docstring * testing the pytest-axe mark * run prettier * Revert "testing the pytest-axe mark" This reverts commit f7b92ea. * Fix D104 * skip a11y tests on CI runs * run a11y tests on one CI worker only * ✅ Register a11y mark and separate dependencies * 👷 Update CI - delegate playwright install and cache * 📝 Update test docs * ✅ Ensure a11y tests are skipped unles called * 👷 Ensure CI installs all deps * ⏪ Revert to installing playwright * 👷 Forgot to re-add a11y deps * ✏️ Fix typo * 🔧 Fix path - seems to have been messed up when moving things * Update tests/test_a11y.py --------- Co-authored-by: Daniel McCloy <dan@mccloy.info> Co-authored-by: Tania Allard <taniar.allard@gmail.com>
- Loading branch information
1 parent
d939eda
commit cbebfc9
Showing
14 changed files
with
327 additions
and
63 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
# Accessibility checks | ||
|
||
The accessibility checking tools can find a number of common HTML patterns which | ||
```{note} | ||
April-2023: we are currently | ||
[re-evaluating how we do accessibility checks](https://github.com/pydata/pydata-sphinx-theme/issues/1168) | ||
and reporting, so this may change soon. | ||
``` | ||
|
||
In general, accessibility-checking tools can find a limited number of common HTML patterns which | ||
assistive technology can't help users understand. | ||
We run a [Lighthouse](https://developers.google.com/web/tools/lighthouse) job in our CI/CD, which generates a "score" for all pages in our **Kitchen Sink** example documentation. | ||
The configuration for Lighthouse is in: | ||
|
||
- `.github/workflows/lighthouserc.json` | ||
## Accessibility checks as part of our development process | ||
|
||
We run a [Lighthouse](https://developers.google.com/web/tools/lighthouse) job in our CI/CD, which generates a "score" for all pages in our **Kitchen Sink** example documentation. | ||
The configuration for Lighthouse can be found in the `.github/workflows/lighthouserc.json` file. | ||
|
||
For more information about configuring lighthouse, see [the lighthouse documentation](https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/configuration.md). | ||
For more information about configuring Lighthouse, see [the Lighthouse documentation](https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/configuration.md). | ||
For more information about Accessibility in general, see [](../../user_guide/accessibility.rst). |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.