Skip to content

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

Merged
merged 95 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
c33a6f2
Install pa11y-ci
thisisdano Apr 19, 2021
e1c4e1f
Add pa11y scripts
thisisdano Apr 19, 2021
7220b66
Add pa11y config
thisisdano Apr 19, 2021
f3441de
Ignore pa11y results JSON
thisisdano Apr 19, 2021
5a57652
Add a script to output results to JSON
thisisdano Apr 19, 2021
0b463c5
Remove scope from TDs (fixed 200 errors)
thisisdano Apr 19, 2021
95fa9b9
Don't output figure
thisisdano Apr 19, 2021
043c27c
Improve site-prose formatting
thisisdano Apr 19, 2021
581e229
Use h2s in form controls accessibility include
thisisdano Apr 19, 2021
b988135
Jekyll ignore pa11y output
thisisdano Apr 19, 2021
145787f
Use accessible color for "disabled" utility state content (fixed 250 …
thisisdano Apr 19, 2021
af659b5
Use white bg for sections that need red-50v callout text (30 errors)
thisisdano Apr 19, 2021
422bd09
Don't use aside inside main content (Fixed 100 errors)
thisisdano Apr 19, 2021
c66f183
Add explicit ID to sidenav
thisisdano Apr 19, 2021
bef7b2b
Fix colors on layout grid page (Fixed 100 errors)
thisisdano Apr 19, 2021
77d5d8c
Fix blockquote color in news
thisisdano Apr 19, 2021
31e895e
Reformat and improve headings in header component
thisisdano Apr 19, 2021
2fca5a1
Try 8 concurrent pa11y
thisisdano Apr 19, 2021
fe512b4
Fix list anchor links
thisisdano Apr 19, 2021
d6578df
Add page.type
thisisdano Apr 19, 2021
8ee21ad
Use underscore hack to provide unique labels
thisisdano Apr 20, 2021
5e6dbf7
Exclude variant partials from sitemap
thisisdano May 12, 2021
b57f358
Simplify pa11y expression
thisisdano May 12, 2021
152df77
Remove heds from standalone card
thisisdano May 12, 2021
6e43f01
Increase pa11y timeout
thisisdano May 12, 2021
b6a3a87
Remove unnecessary h-level heds from icon list
thisisdano May 12, 2021
abf79e4
Fix low-contrast caption
thisisdano May 12, 2021
797027b
Use titles for videos and fix hed levels
thisisdano May 12, 2021
71c3f79
Add label to all aria regions
thisisdano May 12, 2021
8383ec7
Show release info as text
thisisdano May 12, 2021
e07186d
Wrap pre-formatted text
thisisdano May 12, 2021
1172ab1
Use text-only releases on migrations page
thisisdano May 12, 2021
1de3a6e
Fix heading order
thisisdano May 12, 2021
917a8a4
Delete template.md
thisisdano May 12, 2021
8255dfd
Allow scrollable elements to be focused
thisisdano May 12, 2021
befa57d
Don't include standalone template pages in sitemap
thisisdano May 12, 2021
e74c1ae
Use proper heading order
thisisdano May 12, 2021
dafd688
Increase timeout
thisisdano May 12, 2021
31c621f
Add a pa11y github action
thisisdano May 12, 2021
4515700
Use latest version of jekyll-sitemap
thisisdano May 12, 2021
6d1e717
Exclude next from pa11y tests [for now]
thisisdano May 12, 2021
d3658a6
Merge branch 'main' into dw-add-pa11y
thisisdano May 12, 2021
a505f3f
Update package-lock.json
thisisdano May 12, 2021
0ab870c
Update dependencies
thisisdano May 12, 2021
988a374
Update package-lock.json
thisisdano May 12, 2021
8a15f9a
Add USWDS build to github action
thisisdano May 12, 2021
8adc0fe
Update pa11y.yml
thisisdano May 12, 2021
4ee4c5e
Use feature branch of USWDS
thisisdano May 12, 2021
32e37ac
Use localhost:4000 as default url
thisisdano May 12, 2021
221f061
Remove axe test from test script
thisisdano May 12, 2021
7ad19f6
Install html-proofer, update proof test, and proof links
thisisdano May 13, 2021
cc99c23
Update CI settings
thisisdano May 13, 2021
b1ccbd2
Use more permissive cache
thisisdano May 13, 2021
e9dbf51
Serve site before testing; run simple tests first
thisisdano May 13, 2021
3567388
Reorganize scripts
thisisdano May 13, 2021
51f0ccc
Update uswds
thisisdano May 13, 2021
692df79
Update circle
thisisdano May 13, 2021
3cc3106
Make sure we build assets in CI environment
thisisdano May 13, 2021
d3e6f3b
Save to proper cache key
thisisdano May 13, 2021
6af4612
Add new serve script options
thisisdano May 13, 2021
d0ff4b4
Use proper heading order
thisisdano May 13, 2021
f23e850
Fix typo in cache key
thisisdano May 13, 2021
0235353
Trigger re-run
thisisdano May 13, 2021
fc3fc2a
Test fewer concurrent processes
thisisdano May 13, 2021
3a3c1e1
Streamline github action
thisisdano May 13, 2021
550e433
Add pa11y to general tests and remove GH action
thisisdano May 13, 2021
1e3cd6a
Attempt 8 concurrent processes
thisisdano May 13, 2021
0d29acd
Attempt 16 concurrent processes
thisisdano May 13, 2021
6b52b6e
Use 8 concurrent as 16 had no performance gain
thisisdano May 13, 2021
f2f231a
Include next section in accessibility scan
thisisdano May 13, 2021
6b83b30
Add a mobile pa11y config and add to tests
thisisdano May 13, 2021
005beea
Fix accessibility issues in next
thisisdano May 13, 2021
3e5241c
Exclude NEXT from accessibility scan
thisisdano May 13, 2021
ded87c4
Remove duplicate script and add a detached site stop script
thisisdano May 16, 2021
46d9810
Update .snyk
thisisdano May 17, 2021
184528c
Use commas for better voicing
thisisdano May 17, 2021
335f94c
Update uswds
thisisdano May 17, 2021
74dad17
Update package-lock.json
thisisdano May 17, 2021
9ab4818
Merge branch 'main' into dw-add-pa11y
thisisdano May 17, 2021
d81ce65
Add note about scrollable tables and focus
thisisdano May 17, 2021
880b78a
Merge branch 'dw-add-pa11y' of github.com:uswds/uswds-site into dw-ad…
thisisdano May 17, 2021
501cdb9
Use uswds:develop branch
thisisdano May 17, 2021
698da13
Fix indents in next-prefooter.
mejiaj May 18, 2021
1dc3db5
State tokens: update subnav ID.
mejiaj May 18, 2021
9c847fa
Use localhost, not 127.0.0.1
thisisdano May 19, 2021
4209571
Add localhost to serve
thisisdano May 19, 2021
a877657
Remove specific url key from config
thisisdano May 19, 2021
b4685bc
Break out different test sections as separate jobs
thisisdano May 19, 2021
a13bba6
Revert "Break out different test sections as separate jobs"
thisisdano May 19, 2021
563ed6c
Improve functionality and readability of component-guidance include
thisisdano May 19, 2021
53aff16
Use localhost for detached server, too
thisisdano May 19, 2021
0940e02
Add page.type to the ID
thisisdano May 19, 2021
d350e0e
Merge branch 'main' into dw-add-pa11y
thisisdano May 19, 2021
492a5a5
Update .snyk
thisisdano May 19, 2021
2d228b1
Merge branch 'dw-add-pa11y' of github.com:uswds/uswds-site into dw-ad…
thisisdano May 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Contributor Author

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

name: Install scss_lint
command: gem install scss_lint
- save_cache:
key: v1-gem-cache-{{ checksum "Gemfile.lock" }}
key: gem-cache-{{ checksum "Gemfile.lock" }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove unnecessary and confusing v1 key

paths:
- vendor/bundle
- restore_cache:
keys:
- v2-npm-cache-{{ .Branch }}-{{ .Revision }}
- run:
name: Install node dependencies
command: npm install
- run:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adds a build step, building the USWDS dist directory if necessary. This allows those build files to be part of the node installation cache.

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" }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ assets/
contrast-report.json
.jekyll-cache/
vendor/
pa11y-results.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ignore pa11y results when output as JSON

9 changes: 9 additions & 0 deletions .pa11yci
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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"]
}
}
13 changes: 13 additions & 0 deletions .pa11yci--mobile
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": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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
}
}
}
42 changes: 39 additions & 3 deletions .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ ignore:
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-535502:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -212,6 +215,9 @@ ignore:
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540956:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -240,6 +246,9 @@ ignore:
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540958:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -268,6 +277,9 @@ ignore:
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540964:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -296,6 +308,9 @@ ignore:
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540974:
- uswds > gulp-sass > node-sass:
reason: Wait for USWDS 2.6.0
Expand Down Expand Up @@ -343,6 +358,9 @@ ignore:
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540980:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -371,6 +389,9 @@ ignore:
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540990:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -399,6 +420,9 @@ ignore:
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540992:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -427,6 +451,9 @@ ignore:
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540994:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -455,6 +482,9 @@ ignore:
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540996:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -483,6 +513,9 @@ ignore:
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-540998:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -511,6 +544,9 @@ ignore:
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-05-14T18:28:34.968Z'
- gulp-sass > node-sass:
reason: No patch available
expires: '2021-06-16T00:00:27.921Z'
SNYK-JS-NODESASS-541000:
- uswds > gulp-sass > node-sass:
reason: None given
Expand Down Expand Up @@ -1088,7 +1124,7 @@ ignore:
SNYK-JS-NODESASS-1059081:
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-05-14T18:28:34.968Z'
expires: '2021-06-16T00:00:27.921Z'
- uswds > gulp-sass > node-sass:
reason: None given
expires: '2021-03-21T22:33:04.905Z'
Expand All @@ -1101,7 +1137,7 @@ ignore:
SNYK-JS-NODESASS-535500:
- gulp-sass > node-sass:
reason: No available upgrade or patch.
expires: '2021-05-14T18:28:34.968Z'
expires: '2021-06-16T00:00:27.921Z'
- uswds > gulp-sass > node-sass:
reason: None given
expires: '2021-03-21T22:33:04.905Z'
Expand Down Expand Up @@ -1686,7 +1722,7 @@ ignore:
SNYK-JS-POSTCSS-1090595:
- gulp-sourcemaps > @gulp-sourcemaps/identity-map > postcss:
reason: None given
expires: '2021-05-14T18:28:34.968Z'
expires: '2021-06-16T00:00:27.921Z'
- uswds > postcss-discard-comments > postcss:
reason: None given
expires: '2021-05-28T18:17:23.014Z'
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

User the most current jekyll-sitemap

gem 'scss_lint'
gem 'jekyll-include-cache'
gem 'liquid-c'
gem 'html-proofer'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Install the html-proofer gem to allow link and HTML validation proofing.
html-proofer: https://rubygems.org/gems/html-proofer/versions/3.4.0


gem 'rspec-core'
gem 'rspec-expectations'
30 changes: 28 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@ GEM
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
ffi (1.13.1)
forwardable-extended (2.6.0)
html-proofer (3.19.1)
addressable (~> 2.3)
mercenary (~> 0.3)
nokogumbo (~> 2.0)
parallel (~> 1.3)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.6.0)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -52,9 +62,20 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_portile2 (2.5.1)
nokogiri (1.11.3)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
nokogiri (1.11.3-x86_64-darwin)
racc (~> 1.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
parallel (1.20.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
racc (1.5.2)
rainbow (3.0.0)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand All @@ -78,22 +99,27 @@ GEM
sass (~> 3.5, >= 3.5.5)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
unicode-display_width (1.7.0)
yell (2.2.2)

PLATFORMS
ruby
x86_64-darwin-18
x86_64-darwin-19

DEPENDENCIES
html-proofer
jekyll (>= 4.2.0)
jekyll-include-cache
jekyll-redirect-from (>= 0.15.0)
jekyll-sitemap (>= 1.3.1)
jekyll-sitemap (>= 1.4.0)
json (>= 2.3.0)
liquid-c
rspec-core
rspec-expectations
scss_lint

BUNDLED WITH
2.2.1
2.2.14
2 changes: 1 addition & 1 deletion _components/banner/guidance/usability.md
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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.
Expand Down
1 change: 1 addition & 0 deletions _components/button-group/button-group--default.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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`"
Expand Down
1 change: 1 addition & 0 deletions _components/button-group/button-group--segmented.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ lead: Segmented button groups display a set of discrete buttons in a row as a si
order: 02
output: false
parent: Button group
sitemap: false
title: Segmented button group
variants:
- variant: "`.usa-button-group--segmented`"
Expand Down
2 changes: 1 addition & 1 deletion _components/collection/guidance/usability.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
- **Link to additional related content, if applicable.** Collections may not include every piece of content related to its theme. If there's a location that collects more comprehensive results related to the theme, add a link to that location.
- **Provide a button or link to where more articles can be found.** Users may need access to an index or archive where they can find more articles than those listed in the component.
- **Provide a strong "information scent" for each article.** Use headings, teaser text, a thumbnail image, and meta information effectively to help users understand the value of each item and choose which ones to visit.
- **Indicate to the user if they'll navigate to another website.** A common way to do this is to add the [external link class]({{ site.baseurl }}/components/typography/#links) to the heading if the link takes you away from the current site.
- **Indicate to the user if they'll navigate to another website.** A common way to do this is to add the [external link class]({{ site.baseurl }}/components/link) to the heading if the link takes you away from the current site.
- **Don’t force in-page scrolling.** Display all collection items in a flexible container so it displays without forcing the user to scroll within a component container. You can help prevent this by limiting the number of items in the collection to six or fewer.
2 changes: 1 addition & 1 deletion _components/date-input/guidance/accessibility.md
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).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **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).

Copy link
Contributor Author

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

- **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/).
20 changes: 20 additions & 0 deletions _components/figure/_figure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rename to _figure to be absolutely sure this file does not render or get included in the sitemap

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'
---
Loading