It would be really great if there was a simple process to extend core's tests for use in a contrib module to ensure that all of the accessibility improvements are not accidentally broken by the contrib module.
Initial idea:
- Refactor / streamline / simplify the tests around accessibility so that they have a hierarchical structure:
- Base tests for system output.
- Each bundled theme would extend these to include any additional accessibility adjustments necessary for the theme, e.g. DOM-level adjustments where the output adds extra DIVs, etc.
- Clearly document how a contrib theme would go about leveraging the core tests.
- Later on.. create a generator in DrupalConsole to create the necessary test files for a given subtheme.
Comments
Comment #2
mgiffordThere was some automated testing for accessibility that @jessebeach set up with QuailJS. It was somehow tied to Test Swarm. Anyways, not sure what happened with that, but really don't think it's been working for years. Was great when it did. Allowed us to see if there were more or less errors in Core from one day to the next.
Right now though we don't have an automated accessibility testing infrastructure set up. There are a lot of hopeful options though, like:
https://github.com/dequelabs/axe-core
https://tenon.io/
http://quailjs.org/
http://pa11y.org/
https://github.com/Tanaguru/Tanaguru
https://github.com/crawlkit
Just need someone (or a group of folks) to take this on.
Comment #3
andrewmacpherson commentedThere is also http://asqatasun.org/, which I think replaces Tanaguru - I'm not sure if it's a fork or a successor exactly.
Comment #4
andrewmacpherson commentedNote that when #2731373: [upstream] Include an accessibility tester in CKEditor (axe, Tota11y, HTML Code Sniffer) is fixed, it will mean QuailJS is bundled with Drupal core.
Comment #5
mgiffordSorry to read (in that Asqatasun page) that 'the start-up did not succeed in building a sustainable business and collapsed in 2014, loosing the brand "Tanaguru"'.
Comment #6
xjmThis sounds like a really great idea!
Since it sounds like these will mostly be testing improvements, they should be eligible to be added during patch releases. Some API additions etc. might be targeted for the minor instead, depending on the issue.
Comment #10
mgiffordTesting is done in https://www.drupal.org/project/drupalci so setting parent issue.
Comment #11
mgiffordCould be a matter of simply spinning up the default theme and running axe-core on the home page with something like https://humanmade.com/2018/05/17/automated-accessibility-testing-during-...
Hopefully we can build on some of the work that the WP community has started.
Comment #22
mgiffordNow we have nightwatch-axe in core, we're a step ahead. Also tagging for PHPUnit - axe which was flagged recently too.