Skip to content
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

Run axe in jest, with failing builds #522

Merged
merged 3 commits into from
Feb 15, 2018
Merged

Run axe in jest, with failing builds #522

merged 3 commits into from
Feb 15, 2018

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Feb 12, 2018

See https://github.com/nickcolley/jest-axe for source code for the module.

Timings, before:

Test Suites: 21 passed, 21 total
Tests:       1 skipped, 222 passed, 223 total
Snapshots:   25 passed, 25 total
Time:        3.673s

Timings, after:

Test Suites: 21 passed, 21 total
Tests:       1 skipped, 243 passed, 244 total
Snapshots:   25 passed, 25 total
Time:        3.997s

screen shot 2018-02-12 at 18 50 55

screen shot 2018-02-12 at 18 26 16

This work is based on the work on https://github.com/alphagov/govuk_publishing_components 's interaction with aXe

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-522 February 12, 2018 18:57 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-522 February 12, 2018 19:01 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-522 February 13, 2018 12:58 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-522 February 13, 2018 13:19 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-522 February 13, 2018 13:20 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-522 February 13, 2018 13:52 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-522 February 13, 2018 13:52 Inactive
@NickColley NickColley changed the title WIP: Run axe in jest Run axe in jest, with failing builds Feb 13, 2018
@@ -22,7 +22,7 @@ More information about when to use table can be found on [GOV.UK Design System](

<tr class="govuk-c-table__row">

<td class="govuk-c-table__cell" scope="row">January</td>
<td class="govuk-c-table__cell">January</td>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I get a review on this change? I'm not super savvy on table semantics.

https://dequeuniversity.com/rules/axe/1.1/scope

@NickColley
Copy link
Contributor Author

Talked through this PR with @igloosi we agreed we should remove the table issue from this PR and raise an issue to fix it.

@kr8n3r
Copy link

kr8n3r commented Feb 13, 2018

nicely explained by @NickColley how it works. would love to have @alex-ju @hannalaakso and @36degrees to have a look as well

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-522 February 13, 2018 15:41 Inactive
Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me.

package.json Outdated
@@ -54,6 +53,7 @@
"gulp-to-markdown": "^1.0.0",
"gulp-uglify": "^3.0.0",
"jest": "^22.1.4",
"jest-axe": "^2.1.0",
Copy link
Contributor

@alex-ju alex-ju Feb 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we use 2.1.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Includes jest-axe, which allows us to run axe-core directly within our unit tests.
Copy link
Member

@hannalaakso hannalaakso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 🎉 It caught an image without alt tag and a checkboxes with empty name attributes.

@NickColley NickColley merged commit 86da097 into master Feb 15, 2018
@NickColley NickColley deleted the run-axe-in-jest branch February 15, 2018 11:07
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.

5 participants