diff --git a/app/3.0/docs/tools/tests.md b/app/3.0/docs/tools/tests.md index eeeb9f9447..f18dafffd3 100644 --- a/app/3.0/docs/tools/tests.md +++ b/app/3.0/docs/tools/tests.md @@ -295,6 +295,57 @@ Check out Sinon's documentation for more in-depth examples. assertion style. { .alert .alert-info } +### Testing for accessibility +To test for accessibility, you will need to add the following dependencies: + +`npm i -D @webcomponents/webcomponentsjs axe-core web-component-tester pwa-helpers` + +or with yarn: + +`yarn add -D @webcomponents/webcomponentsjs axe-core web-component-tester pwa-helpers` + +Then you need to setup your test file + +```html + + + + + A11y test + + + + + + + + + + + + + + +``` + +Then just add this test file in your test suite (see point below), and then run + +`polymer test` + +To be noted than this is not a silver bullet. A11y should always be tested with real users, and encompasses more than just the technical aspects. And while a technical implementation might be deemed accessible by automated testing, its usage in the real world my prove not accessible. + ### Run a set of test suites {#test-sets} To run a set of test suites: