-
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
Changes from all commits
c33a6f2
e1c4e1f
7220b66
f3441de
5a57652
0b463c5
95fa9b9
043c27c
581e229
b988135
145787f
af659b5
422bd09
c66f183
bef7b2b
77d5d8c
31e895e
2fca5a1
fe512b4
d6578df
8ee21ad
5e6dbf7
b57f358
152df77
6e43f01
b6a3a87
abf79e4
797027b
71c3f79
8383ec7
e07186d
1172ab1
1de3a6e
917a8a4
8255dfd
befa57d
e74c1ae
dafd688
31c621f
4515700
6d1e717
d3658a6
a505f3f
0ab870c
988a374
8a15f9a
8adc0fe
4ee4c5e
32e37ac
221f061
7ad19f6
cc99c23
b1ccbd2
e9dbf51
3567388
51f0ccc
692df79
3cc3106
d3e6f3b
6af4612
d0ff4b4
f23e850
0235353
fc3fc2a
3a3c1e1
550e433
1e3cd6a
0d29acd
6b52b6e
f2f231a
6b83b30
005beea
3e5241c
ded87c4
46d9810
184528c
335f94c
74dad17
9ab4818
d81ce65
880b78a
501cdb9
698da13
1dc3db5
9c847fa
4209571
a877657
b4685bc
a13bba6
563ed6c
53aff16
0940e02
d350e0e
492a5a5
2d228b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,34 +11,34 @@ jobs: | |
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-gem-cache-{{ checksum "Gemfile.lock" }} | ||
- v1-gem-cache | ||
- npm-cache-{{ checksum "package-lock.json" }} | ||
- restore_cache: | ||
keys: | ||
- gem-cache-{{ checksum "Gemfile.lock" }} | ||
- gem-cache | ||
- run: | ||
name: Install ruby dependencies | ||
command: | | ||
gem update --system | ||
gem install bundler | ||
bundle install --jobs=4 --retry=3 --path vendor/bundle | ||
- run: | ||
name: Install scss_lint | ||
command: gem install scss_lint | ||
- save_cache: | ||
key: v1-gem-cache-{{ checksum "Gemfile.lock" }} | ||
key: gem-cache-{{ checksum "Gemfile.lock" }} | ||
![]() Advertisement
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unnecessary and confusing |
||
paths: | ||
- vendor/bundle | ||
- restore_cache: | ||
keys: | ||
- v2-npm-cache-{{ .Branch }}-{{ .Revision }} | ||
- run: | ||
name: Install node dependencies | ||
command: npm install | ||
- run: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adds a build step, building the USWDS |
||
name: Build USWDS if needed | ||
command: npm run build-uswds | ||
- save_cache: | ||
key: v2-npm-cache-{{ .Branch }}-{{ .Revision }} | ||
key: npm-cache-{{ checksum "package-lock.json" }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Saves a cache with the package lock checksum as a key. This means that Circle will use the cached node installation until there are changes to the package. |
||
paths: | ||
- node_modules | ||
- run: | ||
name: Build site files | ||
command: npm run build | ||
- run: | ||
name: Install scss_lint | ||
command: gem install scss_lint | ||
- snyk/scan: | ||
organization: uswds | ||
- run: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ assets/ | |
contrast-report.json | ||
.jekyll-cache/ | ||
vendor/ | ||
pa11y-results.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ignore pa11y results when output as JSON |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Default pa11y settings: |
||
"defaults": { | ||
"userAgent": "pa11y", | ||
"timeout": 120000, | ||
"concurrency": 8, | ||
"standard": "WCAG2AA", | ||
"runners": ["axe"] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"defaults": { | ||
"userAgent": "pa11y", | ||
"timeout": 120000, | ||
"concurrency": 8, | ||
"standard": "WCAG2AA", | ||
"runners": ["axe"], | ||
"viewport": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mobile pa11y settings are the same as the default, but include a special mobile viewport |
||
"width": 375, | ||
"height": 667 | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,11 @@ source 'https://rubygems.org' | |
gem "jekyll", '>= 4.2.0' | ||
gem 'json', '>= 2.3.0' | ||
gem 'jekyll-redirect-from', '>= 0.15.0' | ||
gem 'jekyll-sitemap', '>= 1.3.1' | ||
gem 'jekyll-sitemap', '>= 1.4.0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. User the most current |
||
gem 'scss_lint' | ||
gem 'jekyll-include-cache' | ||
gem 'liquid-c' | ||
gem 'html-proofer' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Install the |
||
|
||
gem 'rspec-core' | ||
gem 'rspec-expectations' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
- **Use the provided text without customization.** The banner is most effective as an identifier and a learning tool when its message is consistent across government websites. With only a few exceptions (see [Implementation guidance](#banner-implementation)), sites should use the TLD-appropriate text provided, unaltered. Use the Spanish version of the banner for Spanish-language websites. | ||
- **Use the provided text without customization.** The banner is most effective as an identifier and a learning tool when its message is consistent across government websites. With only a few exceptions (see [Implementation guidance](#using-the-banner-component)), sites should use the TLD-appropriate text provided, unaltered. Use the Spanish version of the banner for Spanish-language websites. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update internal links throughout |
||
- **Use the version appropriate to your website’s TLD.** If your project uses a .mil top-level domain, use the .mil banner text. | ||
- **Show the banner on every page.** Use the banner at the top of every page of a site. It can be confusing or misleading if it appears on some pages and not others. | ||
- **Avoid distraction.** The banner appears on every page of your site. Choose background colors that fit with your site theme and avoid color combinations that draw excessive attention to the banner. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ layout: component | |
lead: The default button group arranges each button as a separate element with a gap between them. On mobile devices, the buttons are arranged vertically. | ||
order: 01 | ||
parent: Button group | ||
sitemap: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't output partial (child) pages to the sitemap |
||
title: Default button group | ||
variants: | ||
- variant: "`.usa-button-group--segmented`" | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||||||
- **Don’t auto-advance focus.** Do not use JavaScript to auto advance the focus from one field to the next. This makes it difficult for keyboard-only users to navigate and correct mistakes. | ||||||
- **Use "text" instead of "number" inputs.** Research indicates that [numeric inputs still carry many usability problems](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/). |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename to |
||
component: | ||
status: alpha | ||
package: usa-figure | ||
dependencies: | ||
output: false | ||
layout: styleguide | ||
title: Figure | ||
category: Components | ||
lead: Intro text on what is included in this section and how to use it. No more than one or two sentences. | ||
subnav: | ||
- text: Preview | ||
href: '#tk-preview' | ||
- text: Code | ||
href: '#tk-code' | ||
- text: Guidance | ||
href: '#tk-guidance' | ||
- text: Package | ||
href: '#tk-package' | ||
--- |
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.
Rearranges the tasks to group the node and ruby installs