Skip to content

Conversation

@seanpdoyle
Copy link
Contributor

In an effort to support more than Selenium-based drivers, this change modifies the underlying axe.js integration.

Prior to this change, this gem relied entirely on the axe-core-api dependency to execute the audit, collect the results, and raise any violations as testing exceptions.

Unfortunately, that gem does not provide official support for drivers other than Selenium (axe-core-gems#243).

To account for that shortcoming, this commit changes the gem to integrate with the axe.js JavaScript code more directly, including changes that invoke the interface directly through a combination of Capybara's execute_script, evaluate_script, and evaluate_async_script.

In support of that integration, this commit also extracts the AxeAuditor and RaiseReporter classes for the sake of abstracting the auditing and reporting steps (and for future integrations with other styles of audit reporting).

@seanpdoyle seanpdoyle force-pushed the axe-core-js branch 3 times, most recently from 86d50ed to a3c90b4 Compare December 12, 2025 20:13
@seanpdoyle seanpdoyle changed the title Support executing with :cuprite and :playwrigt drivers Support executing with :cuprite and :playwright drivers Dec 12, 2025
@seanpdoyle seanpdoyle force-pushed the axe-core-js branch 17 times, most recently from d5b6dd9 to 5e22602 Compare December 13, 2025 18:02
In an effort to support more than Selenium-based drivers, this change
modifies the underlying `axe.js` integration.

Prior to this change, this gem relied entirely on the [axe-core-api][]
dependency to execute the audit, collect the results, and raise any
violations as testing exceptions.

Unfortunately, that gem does not provide official support for drivers
other than Selenium ([axe-core-gems#243][]).

To account for that shortcoming, this commit changes the gem to
integrate with the `axe.js` JavaScript code more directly, including
changes that invoke the interface directly through a combination of
Capybara's [execute_script][], [evaluate_script][], and
[evaluate_async_script][].

In support of that integration, this commit also extracts the
`AxeAuditor` and `RaiseReporter` classes for the sake of abstracting the
auditing and reporting steps (and for future integrations with other
styles of audit reporting).

[axe-core-api]: https://github.com/dequelabs/axe-core-gems/tree/develop/packages/axe-core-api
[axe-core-gems#243]: dequelabs/axe-core-gems#243
[execute_script]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Session:execute_script
[evaluate_script]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Session:evaluate_script
[evaluate_async_script]: https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Session:evaluate_async_script
@seanpdoyle seanpdoyle merged commit 51c1f0a into main Dec 13, 2025
135 of 144 checks passed
@seanpdoyle seanpdoyle deleted the axe-core-js branch December 13, 2025 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants