-
Notifications
You must be signed in to change notification settings - Fork 194
Add pa11y as a local and CI test #1227
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
Conversation
This is necessary if the results are too long to print to the terminal

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some minor suggestions, otherwise LGTM.
@@ -1,3 +1,3 @@ | |||
- **Follow input guidance.** These text fields should follow the accessibility [guidelines for all text inputs]({{ site.baseurl }}/form-controls/#text-inputs). | |||
- **Follow input guidance.** These text fields should follow the accessibility [guidelines for all text inputs]({{ site.baseurl }}/components/text-input). |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **Follow input guidance.** These text fields should follow the accessibility [guidelines for all text inputs]({{ site.baseurl }}/components/text-input). | |
- **Follow input guidance.** These text fields should follow the accessibility [guidelines for all text inputs]({{ site.baseurl }}/components/text-input/#text-input-guidance). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I think I'd rather link to the page, rather than into the middle of the page
package.json
Outdated
"check-contrast": "node ./utils/check-contrast.js", | ||
"clean": "gulp clean-assets", | ||
"crawl": "node config/crawl.js", | ||
"federalist": "npx gulp build", | ||
"lint": "gulp eslint scss-lint", | ||
"prestart": "gulp build", | ||
"serve": "bundle exec jekyll serve --drafts --future --incremental --livereload", | ||
"proof": "bundle exec htmlproofer --assume-extension --disable-external --allow-hash-href --alt-ignore '/.*/' --file-ignore '/developers/' ./_site", | ||
"serve": "npm run build-all-assets && bundle exec jekyll serve --drafts --future --incremental --livereload", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add localhost here so we get localhost:4000
instead of 127.0.0.1:3000
?
"serve": "npm run build-all-assets && bundle exec jekyll serve --drafts --future --incremental --livereload", | |
"serve": "npm run build-all-assets && bundle exec jekyll serve --drafts --future --incremental --livereload --host=localhost", |
@@ -1,5 +1,5 @@ | |||
<section class="usa-prose site-prose margin-top-5"> | |||
<h3 class="usa-heading heading-margin-alt">General accessibility guidance for forms</h3> | |||
<h2 id="general-accessibility-guidance-for-forms" class="usa-heading heading-margin-alt">General accessibility guidance for forms</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should incorporate the changes in 022c439. It sets unique IDs with id="accessibility-{{ componentKey }}"
.
|
||
<p class="site-subheading">{{ release.published_at | date: "%B %d, %Y" }}</p> | ||
|
||
{% assign id_replace = 'id="v%-' | replace: '%', release.name %} | ||
{{ release.body | markdownify | replace: 'id="', id_replace | remove_relative_links }} | ||
|
||
<div class="highlighter-rouge"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this display of release notes intentional (gray box w/ markdown)?
Just noticed this. Going to Federalist preview link and click on About._.U.S.Web.Design.System.USWDS.-.InPrivate.-.Microsoft.Edge.2021-05-18.11-50-50.mp4It's happening in Firefox, Chrome, and Edge. |
Co-authored-by: James Mejia <[email protected]>
This reverts commit b4685bc.
OK, fixed that localhost issue: by explicitly setting the host in the jekyll build we get proper output in the sitemap and no longer need the |
Summary
Add accessibility and link validity scanning to our website. Now our website has accessibility scanning (with
pa11y
andaXe
) and link validation and HTML5 validity scanning (withhtml-proofer
). We've also remediated any errors discovered by these scans.Improved CI scanning performance. We updated the cache and workflow settings to improve the speed of CircleCI workflows.
Requirements
This PR has a related
uswds
PR: uswds/uswds#4197Merge that PR and update this PR's uswds dependency to
develop
before merging.Details
See code comments