
Enhancing Component Testing for Better User Experience
Explore how the USWDS team incorporates real user testing in their component development process to improve accessibility and user experience. Learn about their internal review practices and commitment to engaging with developers and the community for continuous improvement.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
USWDS Monthly Call January 2023 January 2023 1
Hi! Thanks for being here! Thanks for being here! 2
USWDS FAQ Component testing Tabs Design kits Theming USWDS Custom fonts and colors Banner flash USWDS in other frameworks Importing USWDS component JavaScript 3
James Mejia he/him Engineer USWDS Core Team Contractor 4
Amy Leadem she/her Front End Developer USWDS Core Team Contractor 5
USWDS FAQ Our frequently asked questions 6
Do we test components with real users before releasing? 7
Yes and no. And we can also do better. 8
We always do an internal review that includes manual accessibility testing 9
We always review our work with developers and our community 10
Weve started adding testing with real users of assistive technology 11
This has proven extremely valuable 12
We always respond to issues in our code repo 13
Testing with real users needs to be an ongoing part of a component s lifecycle 14
Accessibility-first usability testing is a big focus of our short-term roadmap 15
Were designing a repeatable process. And it s going slowly. 18
If you wish to make an apple pie from scratch, you must first invent the universe. Carl Sagan 19
Common component acceptance criteria checklist 21
When will the design kit be updated? 25
We update the design kit after every release with design changes. 26
Sketch Adobe XD Figma 27
Coming Spring 2023. github.com/uswds/uswds-for-designers 28
Are you allowed to change how USWDS looks? 29
Yes. 30
We want USWDS to be a tool for designers 31
Start with defaults and customize with tokens 33
Experimentation drives adaptation 34
How do you set custom fonts and colors? 36
System color tokens Over 400 colors in 25 color families, like red- 30 and blue-warm-40v 39
Theme color tokens Type-based tokens used in our component stylesheets, like base and primary-light. 40
@use "uswds-core" with ( $theme-color-primary-lighter: "gold-30v", $theme-color-primary-light: "gold-40v", $theme-color-primary: "gold-50v", $theme-color-primary-vivid: #F5CA55, $theme-color-primary-dark: "gold-60", $theme-color-primary-darker: "gold-70", ) Adding custom colors via settings then using the customized token in component code. .example { background-color: color("primary-vivid"); } 41
Accessibility considerations Use color settings when possible and get built-in contrast checking Do this: @use "uswds-core" with ( $theme-color-primary: #8068D8, $theme-link-color: "primary"; ) Not this: a { color: #8068D8; } 42
Adding a font from a hosting service 1. Add a reference to the JavaScript and CSS provided by the font hosting service in the head of your markup 2.Create a new font token in USWDS 3.Use the font new token in your theme 44
@use "uswds-core" with ( $theme-typeface-tokens: ( "lato": ( "display-name": "Lato Web", "cap-height": 364px, "stack": "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif', ), ), $theme-font-type-sans: "lato", $theme-font-role-heading: "sans", ) Creating and using a new font token Define the typeface token, assign it to a font type, and use it in your stylesheets. .example { @include u-font("sans", "md"); } 45
Adding a self-hosted font 1. Create a new font token in USWDS 2.Assign this new token to font type 3.Add custom path information for this font type 4.Use the new font type token in your theme 46
Given a path: [$theme-font-path]/lato/Lato-Regular.otf [$theme-font-path]/lato/Lato-Regular.ttf Adding custom path information for a font type You ll need .woff, .woff2, and .ttf versions of your self- hosted font. Use settings like: @use "uswds-core" with ( $theme-font-sans-custom-src: ( dir: "lato", roman: ( 400: "Lato-Regular", 700: "Lato-Bold", ), italic: ( 400: "Lato-Italic", 700: "Lato-BoldItalic", ), ), ) 47
How do I stop the banner from flashing open on page load? 49