diff --git a/.github/ISSUE_TEMPLATE/DST-component_accessibility_review.md b/.github/ISSUE_TEMPLATE/DST-component_accessibility_review.md index 996685d22..0361cbb74 100644 --- a/.github/ISSUE_TEMPLATE/DST-component_accessibility_review.md +++ b/.github/ISSUE_TEMPLATE/DST-component_accessibility_review.md @@ -24,4 +24,4 @@ We need to conduct a full accessibility review of the [component name] component ## Acceptance Criteria - [ ] Component has been reviewed for accessibility issues -- [ ] Any accessibility issues have been addressed +- [ ] Any accessibility issues have been addressed or ticket has been written with issues that need to be fixed diff --git a/.github/ISSUE_TEMPLATE/DST-component_design.md b/.github/ISSUE_TEMPLATE/DST-component_design.md index d4de32b4a..b8364e5c8 100644 --- a/.github/ISSUE_TEMPLATE/DST-component_design.md +++ b/.github/ISSUE_TEMPLATE/DST-component_design.md @@ -2,7 +2,7 @@ name: "DST - Component design" about: INTERNAL DST USE ONLY title: "[component name] - Design" -labels: platform-design-system-team +labels: platform-design-system-team, DST-design assignees: babsdenney, danbrady, lwwright7 --- @@ -15,7 +15,7 @@ assignees: babsdenney, danbrady, lwwright7 - [ ] Delete this section once complete ## Description -Create design for [component name] and/or update Sketch artifacts for [component name] +Create design for [component name] and/or update Figma artifacts for [component name] If this is a pattern or component that is already in existence, conduct a small-scale audit (3-5 examples) to make sure there aren't design issues that need to be addressed. Also, check the Design System Team backlog for outstanding design issues. If you find any, link to them in a comment on this ticket. If possible, address any outstanding issues with this design and link to this issue from the original issue. If not, indicate that in the original issue. diff --git a/.github/ISSUE_TEMPLATE/DST_Experimental_request_design b/.github/ISSUE_TEMPLATE/DST_Experimental_request_design new file mode 100644 index 000000000..9a13267a9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/DST_Experimental_request_design @@ -0,0 +1,37 @@ +--- +name: "DST - Experimental request - design" +about: INTERNAL DST USE ONLY +title: "[experimental component name] - Design" +labels: platform-design-system-team +assignees: babsdenney, danbrady, lwwright7 + +--- + +## Configuring this issue +- [ ] Add issue to appropriate epic +- [ ] Add Design System component label (such as `va-alert`) +- [ ] Add `component-new` or `component-update` label, if applicable +- [ ] Complete sections below +- [ ] Delete this section once complete + +## Description +Create design and/or update Figma artifacts for [experimental design component name] + +## Details +[add links to experimental design request ticket or notes with details about the design] +[add links to any research documents related to the component] + +## Tasks +- [ ] Create designs for component +- [ ] Review designs with PO and DST designers +- [ ] Review designs with developers and accessibility specialist +- [ ] Address any comments from reviews, if necessary +- [ ] Comment on this ticket with any accessibility considerations engineers may need to know +- [ ] Comment on this ticket with content specifications (e.g. labels and error messages) +- [ ] Comment on this ticket with a link to the designs and post in DST Slack channel + +## Acceptance Criteria +- [ ] Component design is complete and has been reviewed +- [ ] Accessibility and development considerations have been added to this ticket, if necessary +- [ ] Content specifications have been added to this ticket, if necessary +- [ ] Link to design has been added to this ticket and shared in Slack diff --git a/.github/workflows/deploy-reusable.yml b/.github/workflows/deploy-reusable.yml new file mode 100644 index 000000000..ddbc96f42 --- /dev/null +++ b/.github/workflows/deploy-reusable.yml @@ -0,0 +1,84 @@ +on: + workflow_call: + inputs: + github-sha: + required: true + type: string + github-run-id: + required: true + type: string + github-event-number: + required: false + type: string + matrix-name: + required: true + type: string + matrix-bucket: + required: true + type: string + matrix-config: + required: true + type: string + secrets: + aws-access-key-id: + required: true + aws-secret-access-key: + required: true +jobs: + jekyll-deploy-reusable_workflow_job: + runs-on: ubuntu-latest + environment: + name: ${{ inputs.matrix-name }} + url: "https://${{ inputs.matrix-bucket }}" + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Use Node.js 16.x + uses: actions/setup-node@v2 + with: + node-version: 16.x + cache: 'yarn' + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.5 # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: yarn install + - run: yarn run build + - run: bundle exec jekyll build --config _config.yml,jekyll-configs/${{ inputs.matrix-config }} --baseurl /${{ inputs.github-event-number }} + - name: Make BUILD.txt file + # The -e flag enables the interpretation of the \n newline character + run: | + echo -e "REF=${{ inputs.github-sha }}\n\ + BUILD_ID=${{ inputs.github-run-id }}\n\ + BUILDTIME=$(date)" > _site/BUILD.txt + # We are taking these extra steps due to some differences between Jekyll and AWS S3. + # To access a .html file served from S3, the URL needs to have the .html extension. + # We're removing the extension to make the URLs prettier. + # More context: + # https://simpleit.rocks/ruby/jekyll/tutorials/having-pretty-urls-in-a-jekyll-website-hosted-in-amazon-s3/ + - name: Remove .html extension on non-index files + run: | + find _site/ -type f ! -iname 'index.html' -iname '*.html' \ + -print0 | while read -d $'\0' f; do mv "$f" "${f%.html}"; done + - uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.aws-access-key-id }} + aws-secret-access-key: ${{ secrets.aws-secret-access-key }} + aws-region: "us-gov-west-1" + - name: Sync extensionless html files with correct type + run: | + aws s3 sync _site s3://${{ inputs.matrix-bucket }} \ + --acl public-read \ + --delete \ + --exclude "storybook/*" \ + --exclude "*.*" \ + --content-type "text/html" + - name: Sync remaining files + run: | + aws s3 sync _site s3://${{ inputs.matrix-bucket }} \ + --acl public-read \ + --delete \ + --exclude "*" \ + --include "*.*" \ + --exclude "storybook/*" \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5d3a3eb15..111d59b5e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,16 +8,16 @@ jobs: deploy: strategy: matrix: - environment: [{ bucket: dev-design.va.gov, config: dev.yml }, { bucket: staging-design.va.gov, config: staging.yml }, { bucket: design.va.gov, config: prod.yml }] + environment: [{ bucket: staging-design.va.gov, config: staging.yml }, { bucket: design.va.gov, config: prod.yml }] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Use Node.js 14.x + - name: Use Node.js 16.x uses: actions/setup-node@v2 with: - node-version: 14.x + node-version: 16.x cache: 'yarn' - uses: ruby/setup-ruby@v1 with: @@ -41,7 +41,7 @@ jobs: run: | find _site/ -type f ! -iname 'index.html' -iname '*.html' \ -print0 | while read -d $'\0' f; do mv "$f" "${f%.html}"; done - - uses: aws-actions/configure-aws-credentials@v1 + - uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 000000000..aedde497e --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,25 @@ +name: Preview + +on: + pull_request: + types: + - opened + - reopened + - synchronize + +jobs: + dev-deploy-preview: + strategy: + matrix: + environment: [{ name: development, bucket: "dev-design.va.gov/${{ github.event.number }}", config: dev.yml }] + uses: ./.github/workflows/deploy-reusable.yml + with: + github-sha: ${{ github.sha }} + github-run-id: ${{ github.run_id }} + github-event-number: ${{ github.event.number }} + matrix-name: ${{ matrix.environment.name }} + matrix-bucket: ${{ matrix.environment.bucket }} + matrix-config: ${{ matrix.environment.config }} + secrets: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d2cb32727..d6c499c70 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,16 +7,16 @@ jobs: build: strategy: matrix: - environment: [{ bucket: dev-design.va.gov, config: dev.yml }, { bucket: staging-design.va.gov, config: staging.yml }, { bucket: design.va.gov, config: prod.yml }] + environment: [ { bucket: design.va.gov, config: prod.yml }] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Use Node.js 14.x + - name: Use Node.js 16.x uses: actions/setup-node@v2 with: - node-version: 14.x + node-version: 16.x cache: 'yarn' - uses: ruby/setup-ruby@v1 with: diff --git a/.gitignore b/.gitignore index ad3117a6d..f1d2b06ed 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .jekyll-metadata .sass-cache .vscode +*.code-workspace _site fonts node_modules diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..a2e778299 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.0.2 diff --git a/Gemfile.lock b/Gemfile.lock index 16e5a3924..77a049848 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,8 +64,7 @@ GEM rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) - rexml (3.3.3) - strscan + rexml (3.3.9) rouge (3.29.0) safe_yaml (1.0.5) sass-embedded (1.0.21) @@ -73,11 +72,10 @@ GEM rake (>= 12.3.0) sassc (2.4.0) ffi (~> 1.9) - strscan (3.1.0) terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) unicode-display_width (1.8.0) - webrick (1.7.0) + webrick (1.8.2) PLATFORMS ruby diff --git a/README.md b/README.md index 90d769fef..0d8d0b0ab 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,39 @@ While `vets-design-system-documentation` is running and make further updates to 1. Commit this along with any updates to the documentation site and submit a PR. -## Deploying +## Deployments -Merges into `main` will automatically be deployed to `dev-design.va.gov`. Production is automatically deployed every weekday at 2pm. Deploys are executed by creating a release of vets-website via Jenkins. You can track the deployment in the Slack channel, #design-system. +Merges into `main` will automatically deploy to production `design.va.gov` after CI checks have completed. + +### Previewing Pull Requests + +When a PR is created, a preview of those changes will be available after the [Preview workflow](https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/.github/workflows/preview.yml) has completed. There will be a "View deployment" button visible that will launch the preview environment when clicked: + +![The "view deployment" button on a pull request](https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/images/readme/pr-view-deployment-button.png?raw=true) + +The preview link can also be accessed directly using this pattern: `https://dev-design.va.gov/PR_NUMBER`. For example, `https://dev-design.va.gov/3435` where `3435` is the unique PR number visible in the PR title. + +### Preview Troubleshooting + +#### Check the branch name + +A preview environment will generate only when the PR has been created from a direct branch from the main repository. It does not work if the PR was created from a fork. + +You can confirm if your PR was created from a fork by looking at the branch name at the top of the PR. If you see your Github username in front of your branch name, this means the PR was created from a fork and the preview will not generate. + +![The top of a PR showing the branch to be merged into main. There is a Github username at the front of a branch name which means the branch is from a fork](https://raw.githubusercontent.com/department-of-veterans-affairs/vets-design-system-documentation/refs/heads/main/src/images/readme/pr-branch-from-fork.png) + +If this was done because you don't have write access to this repository, you can request that access by submitting a support request in the #vfs-platform-support Slack channel. + +#### Re-running the preview workflow + +If the preview has stopped working (for example if you're only seeing a 403 Forbidden error or similar), re-run the preview workflow by clicking "Details" next to the Preview check: + +![A list of PR checks with an arrow pointing to the details link for the Preview workflow](https://raw.githubusercontent.com/department-of-veterans-affairs/vets-design-system-documentation/refs/heads/main/src/images/readme/pr-checks-preview-details.png) + +Then click the "Re-run all jobs" button at the top of the page: + +![The "Re-run all jobs" button for running a Github workflow again](https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/images/readme/re-run-workflow-button.png?raw=true) ## Additional Testing diff --git a/jekyll-configs/dev.yml b/jekyll-configs/dev.yml index 7fc0c5174..3861a49a8 100644 --- a/jekyll-configs/dev.yml +++ b/jekyll-configs/dev.yml @@ -1 +1,2 @@ -storybook_path: "/storybook" +url: "https://dev-design.va.gov" # Base hostname & protocol for the preview site +storybook_path: "/storybook" \ No newline at end of file diff --git a/package.json b/package.json index 08c38f662..1b72c5ee7 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/department-of-veterans-affairs/vets-design-system-documentation#readme", "devDependencies": { - "@department-of-veterans-affairs/component-library": "^44.0.0", + "@department-of-veterans-affairs/component-library": "^47.1.0", "gulp": "^4.0.2", "gulp-clean": "^0.4.0", "gulp-rename": "^2.0.0", @@ -38,7 +38,7 @@ }, "dependencies": { "@department-of-veterans-affairs/formation": "^11.0.12", - "@department-of-veterans-affairs/css-library": "^0.8.5" + "@department-of-veterans-affairs/css-library": "^0.12.2" }, "engines": { "npm": "6.14.8" diff --git a/src/_about/accessibility/accessibility-testing-for-design-system-components.md b/src/_about/accessibility/accessibility-testing-for-design-system-components.md new file mode 100644 index 000000000..64ceefed1 --- /dev/null +++ b/src/_about/accessibility/accessibility-testing-for-design-system-components.md @@ -0,0 +1,204 @@ +--- +layout: documentation +title: Accessibility testing for design system components +permalink: /about/accessibility/accessibility-testing-for-design-system-components +has-parent: /about/accessibility/ +anchors: + - anchor: Overview + - anchor: VFS team responsibilities + - anchor: Testing principles + - anchor: Testing methodology +--- + +## Overview + +Accessibility specialists on the [VA.gov](http://va.gov/) Platform team thoroughly test components before they are added or updated in the Design System. This accessibility testing plan outlines a comprehensive strategy to ensure that both our website and mobile application prioritize accessibility throughout the development lifecycle, incorporating best practices and industry standards to create an inclusive digital environment. + +## Responsibilities for teams building products on VA.gov + +Using design system components alone will not guarantee that your product is accessible. + +### Accessibility test your product + +VFS teams are responsible for testing their own products for accessibility and meeting the [VA.gov Experience Standards](https://design.va.gov/about/experience-standards/). Moreover, teams are required to complete [foundational accessibility testing](https://depo-platform-documentation.scrollhelp.site/collaboration-cycle/prepare-for-an-accessibility-staging-review#foundational-testing) as they prepare for a staging review, and are highly encouraged to complete [advanced accessibility testing](https://depo-platform-documentation.scrollhelp.site/collaboration-cycle/prepare-for-an-accessibility-staging-review#advanced-testing) as well. + +### Evaluate components' accessibility in your product + +Design system components are tested in isolation. While we try to ensure that no accessibility barriers exist in any given component, barriers can still be introduced when components are used in an unanticipated combination, or when components are placed in an unanticipated context within the page. + +#### Readability + +Readability of an individual component is highly dependent on the context around that component. When using a component, VFS teams should check: + +- Headings and sub-headings + - Do component headings fit into the overall heading hierarchy of the page? + - Is content in close proximity to the component grouped logically? +- Buttons and link text + - Is any text hardcoded into the component appropriate for your user flow? + - When adding your own text via component properties, is the text meaningful? Does it convey a purpose? +- Labels + - Are any labels hardcoded into the component appropriate for your user flow? + - When adding your own label text via component properties, are the labels clear, concise, and easy to understand? +- Plain language + - Do error messages clearly describe the error and provide a clear path for resolving the error? + +#### Color considerations + +When using a component, VFS teams should check: + +- Color contrast against against backgrounds and nearby or adjacent elements. + +### Report accessibility defects + +If you identify an accessibility defect in a component, please [submit an issue](https://github.com/department-of-veterans-affairs/vets-design-system-documentation/issues/new/choose). + +## Testing principles + +### POUR + +Each component is tested for accessibility in the design system based on the four principles of accessibility. + +- **Perceivable** - Information and user interface components must be presentable to users in ways they can perceive. +- **Operable** - User interface components and navigation must be operable. +- **Understandable** - Information and the operation of user interface must be understandable. +- **Robust** - Content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies. + +### WCAG 2.2 AA + +These principles are the foundation of [Section 508 of the Rehabilitation Act](https://www.access-board.gov/ict/), which incorporates Web Content Accessibility Guidelines (WCAG) 2.0 Level AA success criteria. We aim to adhere to the latest version of WCAG Level AA, which at the time of writing is [WCAG 2.2](https://www.w3.org/TR/WCAG22/). We strive to not only meet those standards, but to go beyond compliance with thorough testing to ensure that we creating an inclusive and equitable experience for everyone. + +### Multiple types of assistive technologies + +Each component is also tested to ensure compatibility with common assistive technologies covering a broad set of common interaction modalities, including: + +- Screen readers (text to speech) +- Voice command/speech recognition (speech to text) +- Screen magnification +- Browser display settings (eg. zoom, text size) +- Device contrast themes +- Keyboard-only +- Mouse-only +- Touch-only +- Alternative input devices + +## Testing methodology + +### Code review + +Code reviews are essential for building inclusive and usable digital products for everyone. Well-written semantic HTML ensures that browsers faithfully convey design system components to users, and ensures maximum compatibility with assistive technologies. Here's what we look for in code: + +- [Valid HTML usage](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML "https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML") + - Are semantic HTML elements used properly? +- [Valid ARIA usage](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics "https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics") + - Are ARIA roles and attributes used properly? +- [Controls are labeled](https://www.w3.org/WAI/tutorials/forms/labels/ "https://www.w3.org/WAI/tutorials/forms/labels/") + - Are elements labeled using appropriate techniques? + +### Automated scans + +Automated accessibility testing tools are crucial for building accessible digital products because they provide a quick and efficient way to identify potential issues. Currently, each design system component goes through: + +- An aXe DevTools scan via Cypress for the default variation of the component. +- An aXe DevTools scan via the browser extension for each additional variation of the component. + +### Readability evaluation + +Readability is a key part of accessibility because it directly impacts how easily users can understand the content. We ensure the following are easy to understand: + +- [Headings and sub-headings](https://design.va.gov/content-style-guide/page-titles-and-section-titles "https://design.va.gov/content-style-guide/page-titles-and-section-titles") + - Are headings used in a hierarchical manner? + - Is the content grouped logically? +- [Button](https://design.va.gov/content-style-guide/button-labels "https://design.va.gov/content-style-guide/button-labels") and [link](https://design.va.gov/content-style-guide/links "https://design.va.gov/content-style-guide/links") text + - Is the text meaningful? + - Does the text convey a purpose? +- Labels + - Are labels clear, concise, and easy to understand? +- [Plain language](https://design.va.gov/content-style-guide/plain-language/ "https://design.va.gov/content-style-guide/plain-language/") + - Is all text consistent with our plain language standards? + +### Use of color + +Color plays a crucial role in accessibility because it significantly impacts how users perceive and interact with digital content, especially those with visual impairments. Here is what we test for: + +- Color contrast meets or exceeds [WCAG Level AA contrast ratios](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html). +- Information is not communicated through color alone. Relying solely on color for communication is an accessibility barrier for individuals with visual impairments. +- Use of [Windows contrast themes](https://learn.microsoft.com/en-us/windows/apps/design/accessibility/high-contrast-themes) (formerly High Contrast Mode) does not result in any use of color regressions from the default color presentation. + +### Text resizing, zoom, and magnification + +Testing text resizing, browser zoom levels, and screen magnifications is crucial for accessibility because it ensures that your website or application remains usable for individuals who need to adjust their browser's display settings or magnify parts of their screen. Here's what we test: + +- Browser font size options correctly resize the text of a component. +- Zoom levels of 200%, 300%, and 400% do not affect the usability of the component. +- Features are visible or discoverable when using [MacOS Zoom](https://support.apple.com/guide/mac-help/change-zoom-settings-for-accessibility-mh40579/mac), [Windows Magnifier](https://support.microsoft.com/en-us/windows/use-magnifier-to-make-things-on-the-screen-easier-to-see-414948ba-8b1c-d3bd-8615-0e5e32204198), and/or similar magnification tools. + +### Screen readers + +Screen reader testing is important for accessibility because it ensures each component is usable for users of assistive technology. We test with the following screen reader and browser combinations to ensure a consistent experience across devices: + +- [JAWS](https://www.freedomscientific.com/products/software/jaws/ "https://www.freedomscientific.com/products/software/jaws/") + Chrome on Windows +- [NVDA](https://www.nvaccess.org/download/ "https://www.nvaccess.org/download/") + Firefox on Windows +- [Narrator](https://support.microsoft.com/en-us/windows/complete-guide-to-narrator-e4397a0d-ef4f-b386-d8ae-c172f109bdb1 "https://support.microsoft.com/en-us/windows/complete-guide-to-narrator-e4397a0d-ef4f-b386-d8ae-c172f109bdb1") + Edge on Windows +- [VoiceOver](https://support.apple.com/guide/voiceover/welcome/mac "https://support.apple.com/guide/voiceover/welcome/mac") + Safari on MacOS +- [TalkBack](https://support.google.com/accessibility/android/answer/6283677?hl=en "https://support.google.com/accessibility/android/answer/6283677?hl=en") + Chrome on Android +- [VoiceOver](https://support.apple.com/guide/iphone/turn-on-and-practice-voiceover-iph3e2e415f/ios "https://support.apple.com/guide/iphone/turn-on-and-practice-voiceover-iph3e2e415f/ios") + Safari on iOS + +With each screen reader, here's what we test: + +- All meaningful content is announced to screen reader users in a logical order consistent with the visual presentation. +- All interactive elements have a unique accessible name. +- All interactive elements are announced with their element type, current value, and current state (as appropriate). +- Common screen reader interaction patterns are supported (eg. navigating a page by heading, navigating a page by landmark, etc). + +### Input and interaction methods + +Each component is tested to ensure it is usable for individuals who rely on different input methods. Input methods tested include: + +- Keyboard-only +- Mouse-only +- Touch-only (as appropriate, where interactions may be distinct from mouse-only) +- [Voice Control](https://support.apple.com/en-us/102225 "https://support.apple.com/en-us/102225") + Safari on MacOS +- [Dragon](https://www.nuance.com/dragon.html "https://www.nuance.com/dragon.html") + Edge or Chrome on Windows + +#### Alternative input devices + +Alternative input devices such as sip-and-puff switches or eye-tracking software are not directly tested. These devices typically map user interactions to specific keystrokes or mouse movements, so robust support for keyboard and mouse combined with well-tested standards-based code should ensure support for these devices. + +Likewise, we do not directly test with refreshable Braille displays or other nonvisual displays, but appropriate use of ARIA and semantic HTML should ensure support for these devices as well. + +#### Testing input methods + +For each input method, we test: + +- Touch and mouse compatibility, including: + + - Target sizes meet or exceed [WCAG Level AA target size requirements](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html "https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html"). + - Controls do not require multipoint or path-based gestures. + - Controls do not require specific click or tap patterns or timing. + +- Keyboard compatibility, including: + - All interactive elements are focusable using the keyboard. + - Focus indicators are fully visible and meet color contrast requirements. + - Form elements such as dropdowns, radio buttons, and sliders can be utilized with arrow keys. + - Interactive elements can be activated with the keyboard. + - Users can exit all interactive elements without being trapped. +- Voice command/speech recognition compatibility, including: + + - The accessible name of elements matches the visible label for the element; or, if not, the visible label supports a clear interaction path. + - Labels have a straightforward pronunciation. + +## Component checklists + +For each component, the results of our accessibility testing are displayed in the component checklist section, organized by the categories described in our testing methodology. Each category may be labeled as: + +- Pass +- Conditional pass +- Pass with exceptions +- Fail +- Not completed + +Additional notes are provided where appropriate. For example, if automated scans for a component indicate a color contrast violation but manual testing for use of color finds that the automated scan result was a false positive, the component checklist may read: + +> **Automated scans** +> +> Pass with exceptions - Axe testing shows a false positive on color contrast for the default variation diff --git a/src/_about/accessibility/focus-management.md b/src/_about/accessibility/focus-management.md new file mode 100644 index 000000000..ad82329a8 --- /dev/null +++ b/src/_about/accessibility/focus-management.md @@ -0,0 +1,51 @@ +--- +layout: documentation +title: Focus management +permalink: /about/accessibility/focus-management +has-parent: /about/accessibility/ +intro-text: Focus is the element on a page that is ready for you to interact with. It's important for making websites accessible, especially for people who use keyboards or other assistive technology to use the site. +anchors: + - anchor: Focus indicator + - anchor: Focus order + - anchor: Focus management + +--- + +Testing is crucial to ensure that focus on your page functions as expected across different scenarios. Below are some things to look out for. + +## Focus indicator + +Sighted keyboard users must always be able to see where the keyboard focus is. If they tab through a website without knowing which element is focused, navigating can be unpredictable. + +Browsers handle displaying the keyboard focus automatically, but each displays it in a different way and may be just enough to pass accessibility guidelines. VA.gov has enhanced this outline to make it more visible. + +![visual focus indicator screenshot]({{ site.baseurl }}/images/about/accessibility/focus-management/focus-indicator.png) + +We advise against disabling the focus outline using `outline: 0` or `outline: none` in CSS. This practice can impair navigation for users who rely on keyboard navigation, especially those with visual impairments. Without a visible focus outline, sighted users may struggle to identify the currently focused element, making navigation difficult. + +## Focus order + +The programmatic focus order should match the visual focus order. Focus typically follows the order in which objects appear in the page source, but may not match the order which users expect to interact with elements on the page. + +This can occur when the order of elements in the source is wrong. If an element's position is moved via CSS, it can move that element from where it would normally be positioned. Elements could also be hidden on a page, typically through moving it off-screen or changing it's opacity, but not taken out of the tab order. This makes them focusable even if the focus indicator cannot be seen. Because of that, be sure to test that focus is not placed on an element that is not visible. + +## Focus management + +Manually managing focus is necessary in some scenarios to provide a seamless and accessible user experience, especially for keyboard and screen reader users. Below are key things to know when setting focus manually. + +### The focus should be intentionally set to the appropriate element when a user action requires a change of context or location + +- When content is added to the screen in response to a user-triggered event, the focus should be moved to the new content. +- When content is removed from the screen in response to a user-triggered event, focus should be set to the next logical place in the interaction. +- Example: When opening a dialog, focus should be sent to that dialog. When the dialog is closed, focus is sent back to the original element that triggered it. + +### Focus should not be lost or reset to the top of the page, except when the page is reloaded + +- If focus is reset, keyboard users will have to start again from the beginning of the page. Screen reader users could also become disoriented and unsure if they are on a different page or if the current page reloaded. +- Example: If focus gets lost after closing a dialog. The focus should be set to the original element that triggered it. + +### When setting focus, the target element must contain text that can be programmatically determined + +- If you must set focus to a non-interactive element, it should have text to allow screen readers to read the text inside the container. + - When setting focus to a non-interactive element, the element should _not_ be added to the tab order of the page through `tabindex="0"`, the focus only needs to be set via JavaScript. +- If focus is set to an empty container, screen readers will have nothing to read, so this should be avoided. diff --git a/src/_about/accessibility/index.md b/src/_about/accessibility/index.md index 3bd586124..03e86d406 100644 --- a/src/_about/accessibility/index.md +++ b/src/_about/accessibility/index.md @@ -4,12 +4,14 @@ title: Accessibility permalink: /about/accessibility/ intro-text: How to follow accessibility standards when using or contributing to the VA Design System (VADS) sub-pages: + - sub-page: Accessibility testing for design system components - sub-page: Accessibility annotations + - sub-page: Focus management --- {% include _site-in-this-section.html %} -VA is here to serve Veterans of the United States military, and [approximately 40% have an identified disability](https://www.statista.com/statistics/250316/us-veterans-by-disability-status/). +VA is here to serve Veterans of the United States military, and [approximately 40% have an identified disability](https://www.statista.com/statistics/250316/us-veterans-by-disability-status/). Therefore, [accessibility is core to all design decisions]({{ site.baseurl }}/about/principles#usable-by-everyone) made in our Design System. All components must be tested before admission into the Design System, and all VA products must be tested before launch. @@ -17,24 +19,21 @@ Therefore, [accessibility is core to all design decisions]({{ site.baseurl }}/ab The VA Design System provides accessible components, the guidance to implement these components, and the tools to customize and extend the design system accessibly. It was built on top of a fork of the U.S. Web Design System (USWDS), which prioritizes accessibility throughout. [Learn more about how USWDS practices accessibility.](https://designsystem.digital.gov/documentation/accessibility/) -Components don’t live in a vacuum. As standalone elements, they can only be tested atomically. For a product to launch, you need to test holistically; you should review the product as a whole before launch. +Components don’t live in a vacuum. As standalone elements, they can only be tested atomically. [Learn more about how VA Design System components are tested.](https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/8b49df2eddc3956daf9cff03728430311c597631/about/accessibility/accessibility-testing) For a product to launch, you need to test holistically; you should review the product as a whole before launch. The surest way to make an accessible product is to “shift left,” or prioritize accessibility during an entire project’s lifecycle. - ## Create accessible products using the Design System -Whenever you make a new component, feature, or product, follow these steps to ensure that, in the end, your creation is accessible. +Whenever you make a new component, feature, or product, follow these steps to ensure that, in the end, your creation is accessible. We recommend a mix of automated, semi-automated, and manual testing. You should also research with real people who use assistive technology to access services online. - ### Design - Review your mockups for accessibility issues before development ([learn how to design with with accessibility in mind](https://www.w3.org/WAI/tips/designing/)) - Add [accessibility annotations](https://www.figma.com/file/CZcnWfQOwtLqPm4WA5paYG/VADS-Annotation-Kit?type=design&node-id=415-1135&mode=design&t=Ld7dhuyaPcerrnPF-0) to your mockups to communicate important semantic information (heading levels, aria-labels, etc.) to designers, developers, and accessibility specialists - ### Development Manually test your product: @@ -44,51 +43,51 @@ Manually test your product: - Keyboard navigation - Heading levels ([HeadingsMap](https://chromewebstore.google.com/detail/headingsmap/flbjommegcjonpdmenkdiocclhjacmbi) is a useful Chrome extension) - With screen readers - - Based on recommendations from the [Blinded Veterans Association](https://bva.org/), we recommend testing with the following as a minimum: - - iOS with Safari using VoiceOver (Mobile) - - Windows 11 with Chrome using JAWS (Desktop) + - Based on recommendations from the [Blinded Veterans Association](https://bva.org/), we recommend testing with the following as a minimum: + - iOS with Safari using VoiceOver (Mobile) + - Windows 11 with Chrome using JAWS (Desktop) - Conduct automated testing with [axe DevTools by Deque](https://www.deque.com/axe/) +- [Evaluate how Design System components](accessibility-testing-for-design-system-components.md) are used to ensure they aren’t appearing in an unanticipated combination or context within a page. ### Research - [Test with people who use assistive technology](https://depo-platform-documentation.scrollhelp.site/research-design/research-assistive-technology-sessions) (at least 20% of your participants) - ## Contribute accessible components to the Design System ### Foundational accessibility tests As part of staging reviews, new components must complete [foundational accessibility testing using this GitHub ticket](https://github.com/department-of-veterans-affairs/va.gov-team/issues/new?assignees=briandeconinck&labels=a11y-testing&projects=&template=a11y-testing.yaml&title=Accessibility+Testing+for+%5BTeam+Name%2C+Product+Name%2C+Feature+Name%5D). Foundational testing requires evaluating: -1. Color and color contrast -2. Automated testing with [axe by Deque](https://www.deque.com/axe/) -3. Content zoom and reflow -4. Keyboard navigation +1. Color and color contrast +2. Automated testing with [aXe DevTools by Deque](https://www.deque.com/axe/) +3. Content zoom and reflow +4. Keyboard navigation ### Advanced testing with mobile and desktop screen readers -As part of staging reviews, new components must also complete [advanced testing with an accessibility specialist](https://depo-platform-documentation.scrollhelp.site/collaboration-cycle/prepare-for-an-accessibility-staging-review#Prepareforanaccessibilitystagingreview-Advancedaccessibilitytests(recommended)advanced-testing) using a screen reader on both mobile and desktop. As a default, based on recommendations from the [Blinded Veterans Association](https://bva.org/), we recommend testing with the following at a minimum: +As part of staging reviews, new components must also complete [advanced testing with an accessibility specialist]() using a screen reader on both mobile and desktop. As a default, based on recommendations from the [Blinded Veterans Association](https://bva.org/), we recommend testing with the following at a minimum: -* iOS with Safari using VoiceOver (Mobile) -* Windows 11 with Chrome using JAWs (Desktop) +- iOS with Safari using VoiceOver (Mobile) +- Windows 11 with Chrome using JAWs (Desktop) If time and resources allow, do a more comprehensive review by testing with: -* Android with Chrome using TalkBack (Mobile) -* Windows 11 with Chrome using NVDA (Desktop) -It is the intention of this team to improve our testing standards to more accurately reflect the full experience of users with disabilities. Today our compliance testing sets a minimal standard (WCAG 2.1 AA) that we are striving to raise. +- Android with Chrome using TalkBack (Mobile) +- Windows 11 with Chrome using NVDA (Desktop) + +It is the intention of this team to improve our testing standards to more accurately reflect the full experience of users with disabilities. Today our compliance testing sets a minimal standard (WCAG 2.2 AA) that we are striving to raise. ## Resources for Veteran-facing service teams ### Get accessibility guidance early from the CAIA team -The Sitewide Content, Accessibility, and Information Architecture (CAIA) team can help you meet VA.gov’s accessibility standards. Whether you’re starting a new product or refining an existing one, contact the CAIA team as early as possible to create accurate, consistent, accessible, and equitable digital services for Veterans. +The Sitewide Content, Accessibility, and Information Architecture (CAIA) team can help you meet [VA.gov](http://VA.gov)’s accessibility standards. Whether you’re starting a new product or refining an existing one, contact the CAIA team as early as possible to create accurate, consistent, accessible, and equitable digital services for Veterans. - Submit a [Sitewide Content, Accessibility, and IA intake form ticket](https://github.com/department-of-veterans-affairs/va.gov-team/issues/new?assignees=RLHecht%2C+coforma-terry%2C+kristinoletmuskat%2C+laurwill%2C+sara-amanda&labels=sitewide+CAIA%2C+sitewide+content-product+support%2C+Sitewide+IA%2C+sitewide+content%2C+sitewide+accessibility&projects=&template=sitewide-content-intake-form.md&title=%3CType+of+Request%3E+from+%3CTeam%3E) in GitHub -- [Contact CAIA on Slack -](https://depo-platform-documentation.scrollhelp.site/collaboration-cycle/sitewide-content-and-ia-intake-request#Content,Accessibility,andInformationArchitecturesupport-SitewideCAIA-Contactus) +- [Contact CAIA on Slack](https://depo-platform-documentation.scrollhelp.site/collaboration-cycle/sitewide-content-and-ia-intake-request#Content,Accessibility,andInformationArchitecturesupport-SitewideCAIA-Contactus) -### Learn how to make accessible products on the modernized VA.gov platform +### Learn how to make accessible products on the modernized [VA.gov](http://VA.gov) platform - [Resources for researchers](https://depo-platform-documentation.scrollhelp.site/developer-docs/accessibility-on-va-gov#AccessibilityonVA.gov-ResourcesforResearchers) - [Resources for designers](https://depo-platform-documentation.scrollhelp.site/developer-docs/accessibility-on-va-gov#AccessibilityonVA.gov-ResourcesforDesigners) diff --git a/src/_about/contributing/experimental-design.png b/src/_about/contributing/experimental-design.png new file mode 100644 index 000000000..1a10169ca Binary files /dev/null and b/src/_about/contributing/experimental-design.png differ diff --git a/src/_about/contributing/index.md b/src/_about/contributing/index.md index 5a09a95cf..099d33e9e 100644 --- a/src/_about/contributing/index.md +++ b/src/_about/contributing/index.md @@ -24,4 +24,15 @@ When considering if a component or pattern should be added to the design system 2. The component or pattern is different in more than one major way than existing components in the design system, if the component is only different in color or format, for instance, then it would be better as a variant of the existing component. Note that variants of existing components should also go through this experimental process. 3. Our existing components and patterns will not solve the user problems sufficiently. -{% include _site-in-this-section.html %} \ No newline at end of file +### Experimental design decision tree and process + +{% include component-example.html alt="A thumbnail image of experimental design decision tree and process Mural" file="/images/about/experimental-design.png" caption="A thumbnail image of experimental design decision tree and process Mural" %} + + + +View the experimental design decision tree and process Mural. + +{% include _site-in-this-section.html %} diff --git a/src/_about/designers/creating-components.md b/src/_about/designers/creating-components.md index 25265fc5f..9ed94d58d 100644 --- a/src/_about/designers/creating-components.md +++ b/src/_about/designers/creating-components.md @@ -128,7 +128,7 @@ All text styles should be pulled from the VADS Figma file.  ### Iconography -* **Only use icons from the VA Design System.** Currently, these are [Font Awesome version 5.15.4 icons]({{ site.baseurl }}/foundation/icons) however, we are moving to the [USWDS icon set](https://designsystem.digital.gov/components/icon/). Some USWDS v3-based components are already using USWDS icons. +* **Only use icons from the VA Design System.** [Our icons](https://design.va.gov/foundation/icons) are a subset of [USWDS icons](https://designsystem.digital.gov/components/icon/). We aim to maintain consistency in semantic use by avoiding duplicating similar icons. If you have a need for an icon that doesn't exist in our set, you may [request a new icon](https://design.va.gov/foundation/icons#requesting-a-new-icon) to be added. ## Quality assurance diff --git a/src/_about/developers/using-web-components.md b/src/_about/developers/using-web-components.md index 431d03f0c..2e1819d4e 100644 --- a/src/_about/developers/using-web-components.md +++ b/src/_about/developers/using-web-components.md @@ -11,8 +11,6 @@ anchors: - anchor: React applications - anchor: Custom events - anchor: Native events - - anchor: How to migrate to Web Components - - anchor: How to migrate from Font Awesome to va-icon --- ## How to use a web component @@ -205,64 +203,3 @@ Another example using the `blur` event in vanilla JavaScript:
For more information about native events in a specific component, refer to the [Storybook documentation](https://design.va.gov/storybook/?path=/docs/about-introduction--page). - -## How to migrate to Web Components - -The Design System Team provides three ways to migrate specific React Components over to Web Components: -* **Manual** - There is an ESLint rule that informs you that the React component is deprecated but there are too many changes to automate a replacement and a guide will need to be followed ([Storybook](https://design.va.gov/storybook/?path=/story/about-introduction--page) example, Confluence documentation, or other guidance within the ESLint popup). -* **ESLint Rule** - There is an ESLint rule that informs you of the ability to convert from a React Component to a Web Component with a migration click. -* [**Migration Script**](https://github.com/department-of-veterans-affairs/vets-website/blob/main/script/component-migration/README.md) - There is a script available to be used in the CLI when in the `vets-website` repo to convert the React Component to a Web Component. - -Auto-migrations may not be able to perfectly migrate every component. Before you merge your PR be sure to inspect the diff and test thoroughly. Migrations also do not update test files so you will need to update those manually. - -### Web component migrations - -Here is a list of each Web Component and the migration available: - -* `va-modal`: [ESLint Rule](https://github.com/department-of-veterans-affairs/veteran-facing-services-tools/blob/e37233f7ed059c91bf43e92f825390bbf5991298/packages/eslint-plugin/lib/rules/prefer-web-component-library.js) - -## How to migrate from Font Awesome to va-icon - -Font Awesome icons will be deprecated in late-May 2024 in favor of the `va-icon` web component which uses USWDS icons. USWDS icons are a combination of Material Icons and [custom icons](https://github.com/department-of-veterans-affairs/dst-uswds-compile/tree/main/assets/icons). A searchable set can be viewed on the [USWDS Icon page](https://designsystem.digital.gov/components/icon/). - -### Quick References -- [Icon Name Mapping](https://design.va.gov/foundation/icons) -- [va-icon on Storybook](https://design.va.gov/storybook/?path=/docs/uswds-va-icon--default) -- Slack channel: `#platform-design-system` - - - -### The va-icon Web Component API - -Examples and details for the va-icon web component can be found on [Storybook](https://design.va.gov/storybook/?path=/docs/uswds-va-icon--default). The web component has the following customization properties available: - -- icon: The name of the icon to use -- size: The size of the icon as a value between 3 and 9. Sizing can be previewed in Storybook by adjusting the size control - - 3: 24px - - 4: 32px - - 5: 40px - - 6: 48px - - 7: 56px - - 8: 64px - - 9: 72px -- srtext: Screen-reader text if the icon has semantic meaning and is not purely decorative - -### Mapping Icon Names - -Icon name mapping from Font Awesome to USWDS can be found on the [Icons Foundation page](https://design.va.gov/foundation/icons). Icon names can also be referenced on [Storybook](https://design.va.gov/storybook/?path=/docs/uswds-va-icon--default) or the [USWDS Icon page](https://designsystem.digital.gov/components/icon/). \ No newline at end of file diff --git a/src/_about/experience-standards.md b/src/_about/experience-standards.md index ee4c65385..fc0d304e2 100644 --- a/src/_about/experience-standards.md +++ b/src/_about/experience-standards.md @@ -20,7 +20,7 @@ Governance team references these standards when we review products during the Co ## List of Experience Standards -There are 22 experience standards grouped into 7 user experience categories. +There are 23 experience standards grouped into 7 user experience categories. ### Category: Comprehension @@ -118,6 +118,12 @@ GitHub label: [exp-std-voice-tone](https://github.com/department-of-veterans-aff GitHub label: [exp-std-form-integrity](https://github.com/department-of-veterans-affairs/va.gov-team/labels/exp-std-form-integrity) +#### User receives appropriate notification from the VA or VA.gov about the status of their request + +**There's an issue when:** User does not receive appropriate notification from the VA or VA.gov about the status of their request. + +GitHub label: [exp-std-submission-status](https://github.com/department-of-veterans-affairs/va.gov-team/labels/exp-std-submission-status) + ### Category: Efficiency User can accomplish their goals as quickly and efficiently as possible, with minimal cognitive load. diff --git a/src/_about/whats-new.md b/src/_about/whats-new.md index 7fb0f5cff..2a7cec573 100644 --- a/src/_about/whats-new.md +++ b/src/_about/whats-new.md @@ -9,21 +9,46 @@ title: What’s new? The latest news and updates on the Design System, Forms library and the Content style guide. - -

- v1 components have now been deprecated -

-
-

- If your team is still using a v1 component, instances will be flagged in the Collab Cycle and may be considered launch blocking. Learn how to migrate a component. -

-
-
+## Fall 2024 + +### New and updated components +* va-process-list-item: Add text to describe status by @powellkerry in #1362 +* Add custom message to va-file-input and update message in va-file-input-multiple by @ataker in #1367 +* va-table: add sorting variation by @it-harrison in #1358 +* va-file-input: add support for read-only mode by @pennja in #1300 +* va-date: add prop to make month optional by @it-harrison in #1377 + +### Bug fixes +* va-modal: set box-sizing to border-box to prevent text overflow by @powellkerry in #1357 +* va-accordion: open accordion when media is print by @ataker in #1363 +* va-process-list: update status eyebrow text to uppercase by @powellkerry in #1365 +* va-process-list: change color variable from usa to vads by @powellkerry in #1368 +* va-table: show table header for non-stacked & stacked small screen by @harshil1793 in #1364 +* va-table: update va-table-inner to properly scope table header row to columns by @1Copenut in #1370 +* va-select: add import for focusable mixin by @powellkerry in #1376 +* va-modal: set overflow-wrap:anywhere on modal content by @powellkerry in #1372 +* focusable: add tabindex selector by @powellkerry in #1380 + +### Other changes +* CSS Library: replace FA icons for action link and alert classes by @jamigibbs in #1371 +* CSS Library: style and image path updates for alert and action link modules by @jamigibbs in #1378 +* CSS Library: remove the /alerts image path by @jamigibbs in #1381 + +### Design updates +* [Design] Table variations #3137 +* [Design]Update Alert spacing in Figma #3231 +* Update breadcrumb spacing in Page templates - Design #3049 + +### Documentation updates +* Update guidance for Keep a record of submitted information pattern #3054 +* Add List guidance to VADS #3206 +* Alerts - Sign in - Documentation +* Issue with downloading logos (PNG format) +* Update va-link External link variation guidance #3224 +* Multiple responses pattern and flow chart #3219 +* Update guidance for select component - Documentation #3251 +* Guidance for international phone numbers #3316 +* Update gender pattern #3289 ## Summer 2024 @@ -36,7 +61,7 @@ The team synced up typography with USWDS v3 and continues to focus on syncing up * [Text input - Suffix text]({{ site.baseurl }}/components/form/text-input#suffix-text) * [Text input - Prefix and Suffix]({{ site.baseurl }}/components/form/text-input#prefix-and-suffix) -Component Library releases +Component Library releases ### New and updated guidance @@ -48,7 +73,7 @@ The team synced up typography with USWDS v3 and continues to focus on syncing up ### Bug fixes -[Issues closed this summer](https://github.com/department-of-veterans-affairs/vets-design-system-documentation/issues?q=is%3Aissue+is%3Aclosed+closed%3A2024-06-01..2024-08-30+) +[Issues closed this Summer](https://github.com/department-of-veterans-affairs/vets-design-system-documentation/issues?q=is%3Aissue+is%3Aclosed+closed%3A2024-06-01..2024-08-30+) (206) ## Spring 2024 @@ -235,4 +260,4 @@ Modal (#1634, #2449, #2450) * Developer contribution page updates in #2446 * va-alert and va-expandable-alert: Updated accessibility documentation for announcing alerts (role="alert") in #2145 -* Design Libraries has been updated with Figma information in #2410 \ No newline at end of file +* Design Libraries has been updated with Figma information in #2410 diff --git a/src/_components/alert-expandable.md b/src/_components/alert/alert-expandable.md similarity index 90% rename from src/_components/alert-expandable.md rename to src/_components/alert/alert-expandable.md index 58531ed9e..3d9458f1d 100644 --- a/src/_components/alert-expandable.md +++ b/src/_components/alert/alert-expandable.md @@ -1,6 +1,8 @@ --- layout: component title: Alert - Expandable +permalink: /components/alert/alert-expandable/ +has-parent: /components/alert/ github-title: va-alert-expandable intro-text: A minimized alert style that can be used to alert a user to relevant information on the page that is not prompted by their own action. This component combines the Additional Info component with the Background-Color only Alert variation color schemes. figma-link: https://www.figma.com/file/JDFpGLIojfuQwANXScQjqe/VADS-Component-Example-Library?type=design&node-id=35%3A146&mode=design&t=J32RmU6Fjbjuh9bD-1 @@ -31,24 +33,6 @@ anchors: {% include storybook-preview.html story="components-va-alert-expandable--success" link_text="va-alert-expandable" %} -{% comment %} - - ### Error alert - -Used when there is a problem or something destructive is about to occur. - -{% include storybook-preview.html story="components-va-alert-expandable--error" link_text="va-alert-expandable" %} - -### Continue alert - -{% include storybook-preview.html story="components-va-alert-expandable--continue" link_text="va-alert-expandable" %} - -### No icon alerts - -{% include storybook-preview.html story="components-va-alert-expandable--no-icon" link_text="va-alert-expandable" %} - -{% endcomment %} - ## Usage ### When to use Alert - Expandable @@ -105,6 +89,6 @@ The alert was tested as part of a usability study with 9 participants. The alert ## Related * [Additional info]({{ site.baseurl }}/components/additional-info) -* [Alert - Background only]({{ site.baseurl}}/components/alert/background-only) +* [Alert]({{ site.baseurl}}/components/alert/alert) {% include _component-checklist.html component_name=page.web-component %} \ No newline at end of file diff --git a/src/_components/alert/alert-sign-in.md b/src/_components/alert/alert-sign-in.md new file mode 100644 index 000000000..059b98dd3 --- /dev/null +++ b/src/_components/alert/alert-sign-in.md @@ -0,0 +1,97 @@ +--- +layout: component +permalink: /components/alert/alert-sign-in/ +has-parent: /components/alert/ +title: Alert - Sign-in +github-title: va-alert-sign-in +intro-text: An alert component with specific content focused on helping users complete the sign-in process. +figma-link: https://www.figma.com/design/JDFpGLIojfuQwANXScQjqe/VADS-Component-Examples?node-id=5359-436 +status: use-with-caution-candidate +web-component: va-alert-sign-in +anchors: + - anchor: Examples + - anchor: Usage + - anchor: Behavior + - anchor: Content considerations + - anchor: Accessibility considerations + - anchor: Related + - anchor: Component checklist +--- + +## Examples +{% include content/sign-in-alert-examples.md %} + +## Usage + +### When to use Alert - Sign-in + +* **Static pages with entry points to online tools.** The sign-in alert appears on a static unauthenticated VA.gov page and serves as the entry point to the tool's authenticated experience. The Office of the Chief Technology Officer's content/information architecture/accessibility team (CAIA) team manages these pages in Drupal. Work with CAIA to add the alert to the correct page. +* **Form intro pages.** The sign-in alert goes on the form intro page that the product team creates and manages. The URL for this page ends in /introduction. + **Exception:** If your form is only accessible after signing in (meaning there is no unauthenticated state of the intro page), the sign-in alert must appear on the static unauthenticated page that serves as the entry point. Currently, this only applies to 2 forms in the /my-health section: the 1010EZR and the order form for CPAP and hearing aid supplies. + +### Placement +* **For entry points to online tools**, work with CAIA to determine placement on the static page. Placement may vary depending on the page structure. Always place the alert directly under a header that makes it clear what the user is signing in to do (for example, "Check your claim status online"). +* **On form intro pages**, place the alert directly after the process list or "what to know" section of the intro page. (Some forms have a process list and some have "what to know." [Refer to the form into page template for that guidance](https://design.va.gov/templates/forms/introduction).) + +## Behavior +[Refer to the related sign-in pattern page for full guidance](https://design.va.gov/patterns/help-users-to/sign-in) + +### All products that only allow verified accounts must implement 1 of these 2 alert variations + +#### Required sign-in (verified) + +When these are true: +* Person is not signed in, **and** +* Your product requires people to sign in, **and** +* Your product only accepts verified (LOA3 or IAL2) accounts + +#### Optional sign-in (verified) + +When these are true: +* Person is not signed in, **and** +* Your product is a form, **and** +* Your product doesn't require sign-in, but if people choose to sign in they must use verified (LOA3 or IAL2) accounts, **and** +* Your form supports both prefill and save-in-progress + +### All products that only allow verified accounts must implement all 3 of these alerts + +#### Verify with ID.me + +When these are true: +* Person is signed in with an unverified (LOA1 or IAL1) ID.me account, **and** +* Your product only accepts verified (LOA3 or IAL2) accounts + +#### Verify with Login.gov + +When these are true: +* Person is signed in with an unverified (LOA1 or IAL1) Login.gov account, **and** +* Your product only accepts verified (LOA3 or IAL2) accounts + +#### Sign in with another account + +When these are true: +* Person is signed in with an unverified (LOA1 or IAL1) My HealtheVet account, **and** +* Your product only accepts verified (LOA3 or IAL2) accounts + +{% include component-docs.html component_name=page.web-component %} + +## Content considerations +If your product fits one of these descriptions, you may need to adjust the standard sign-in alert component content for your situation: + +* A product that either requires or allows sign-in, but accepts unverified accounts +* An online form that allows sign-in but does not support prefill +* An online form that allows sign-in and offers a different reason to sign in—like generating an automatic Intent to File (ITF) +* A health tool that requires registration with My HealtheVet (currently only applies to messages, medications, and medical records tools) + +Work with the CAIA and identity teams to adjust the content in this component for your product. + +## Accessibility considerations + +{% include a11y/alerts.md %} + +## Related + +* [Alert]({{ site.baseurl}}/components/alert/alert) +* [Pattern - Help users to sign in]({{ site.baseurl}}/patterns/help-users-to/sign-in) + +{% include _component-checklist.html component_name=page.web-component %} diff --git a/src/_components/alert.md b/src/_components/alert/index.md similarity index 97% rename from src/_components/alert.md rename to src/_components/alert/index.md index e8f6bb555..2ebd6f0d8 100644 --- a/src/_components/alert.md +++ b/src/_components/alert/index.md @@ -1,12 +1,16 @@ --- layout: component title: Alert +permalink: /components/alert/ status: use-best-practice intro-text: "Alerts keep users informed of important and sometimes time-sensitive changes." research-title: "Alert boxes" figma-link: https://www.figma.com/file/JDFpGLIojfuQwANXScQjqe/VADS-Example-Library?type=design&node-id=35%3A145&mode=design&t=ep6tlGT5gNsbWqGP-1 uswds-v3: default web-component: va-alert +sub-pages: + - sub-page: Alert - Expandable + - sub-page: Alert - Sign-In anchors: - anchor: Examples - Standard - anchor: Examples - Standard properties @@ -100,7 +104,7 @@ Any style of alert box can be modified to be a Slim alert. The iconography for S #### Additional reasons to consider something else * **Destructive actions.** If an action will result in destroying a user’s work (for example, deleting an application) use a more intrusive pattern, such as a confirmation [modal]({{ site.baseurl }}/components/modal) dialogue, to allow the user to confirm that this is what they want. -* **Unprompted and in-page alerts.** Consider the [Alert - Expandable]({{ site.baseurl }}/components/alert-expandable) component to draw attention to important information on the page that is not a response to user feedback. +* **Unprompted and in-page alerts.** Consider the [Alert - Expandable]({{ site.baseurl }}/components/alert/alert-expandable) component to draw attention to important information on the page that is not a response to user feedback. * **Clarifying background information.** Use the [Additional info]({{ site.baseurl }}/components/additional-info) component when clarifying outcomes for an input or a form question as well as providing background information. Keep in mind that Alert - Expandable should warrant an alert and be used sparingly. The value of any type of alert is diminished if the page is littered with alerts of equal weight. * **System maintenance.** Most [system messages]({{ site.baseurl }}/content-style-guide/error-messages/system) related to maintenance are handled by the [Banner - Maintenance]({{ site.baseurl }}/components/banner/maintenance) component. diff --git a/src/_components/breadcrumbs.md b/src/_components/breadcrumbs.md index 547ea09fc..86f8c58d3 100644 --- a/src/_components/breadcrumbs.md +++ b/src/_components/breadcrumbs.md @@ -63,6 +63,11 @@ Start with "VA.gov home". Clearly indicate that the home page is the VA.gov home * The breadcrumb should be placed below the header and above the main content. * The placement of the breadcrumb must be consistent from page to page. +* Spacing for the breadcrumb is built in to the component and should be consistent throughout all layouts. The correct spacing is specified in the images below: + +{% include component-example.html alt="Breadcrumbs have 20px / 2.5 spacing units above and 32px / 4 spacing units below at a mobile breakpoint." file="/images/components/breadcrumbs/breadcrumbs-spacing-mobile.png" caption="Breadcrumbs have 20px or 2.5 spacing units above and 32px or 4 spacing units below at a mobile breakpoint." %} + +{% include component-example.html alt="Breadcrumbs have 20px / 2.5 spacing units above and 48px / 6 spacing units below at a desktop breakpoint." file="/images/components/breadcrumbs/breadcrumbs-spacing-desktop.png" caption="Breadcrumbs have 20px or 2.5 spacing units above and 48px or 6 spacing units below at a desktop breakpoint." %} ### Behavior @@ -90,4 +95,4 @@ To use React Router with this component [follow these instructions](https://desi ### Additional accessibility guidance for VA -* **Make current page a link.** Use a link for the current page for robustness. While it may sound counterintuitive to link to the current page in this component, it makes sense to include this as a link so screen readers voice the current page link whether the user navigates by element or by tabbing. Making the current page a link rather than text makes it a focusable and clickable element. It also follows [WAI-ARIA Authoring Practices Guide (APG) guidances](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/) which states that an `a` element with `aria-current="page"` should represent the current page. \ No newline at end of file +* **Make current page a link.** Use a link for the current page for robustness. While it may sound counterintuitive to link to the current page in this component, it makes sense to include this as a link so screen readers voice the current page link whether the user navigates by element or by tabbing. Making the current page a link rather than text makes it a focusable and clickable element. It also follows [WAI-ARIA Authoring Practices Guide (APG) guidances](https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/) which states that an `a` element with `aria-current="page"` should represent the current page. diff --git a/src/_components/form/autosave.md b/src/_components/form/autosave.md index 0d2a41b28..8df4091ed 100644 --- a/src/_components/form/autosave.md +++ b/src/_components/form/autosave.md @@ -26,6 +26,10 @@ anchors: ## Usage + +

Testing has revealed issues with this component. See this Usability Report for more details.

+
+ ### When to use * **When saving form flow progress as a user completes an application.** This message provides confirmation to the user that their form progress is being saved as they progress through a form flow for an application. diff --git a/src/_components/form/checkbox.md b/src/_components/form/checkbox.md index 4a28276d0..25dce4ea8 100644 --- a/src/_components/form/checkbox.md +++ b/src/_components/form/checkbox.md @@ -14,6 +14,7 @@ anchors: - anchor: Examples - Group - anchor: Usage - anchor: Code usage + - anchor: Content considerations - anchor: Accessibility considerations --- @@ -142,6 +143,11 @@ anchors: The native onBlur event is available on this component. It can be used by adding the event handler to your component and it will then listen to the event and respond accordingly when the event fires. +## Content considerations + +Refer to our bulleted list guidance for punctuation and general considerations + ## Accessibility considerations -Refer to the U.S. Web Design System for accessibility guidance \ No newline at end of file +Refer to the U.S. Web Design System for accessibility guidance diff --git a/src/_components/form/date-input.md b/src/_components/form/date-input.md index c6d47d85f..a218e1af4 100644 --- a/src/_components/form/date-input.md +++ b/src/_components/form/date-input.md @@ -43,14 +43,15 @@ web-component: va-date ### When to use date input -- Use a month, day, year date input component for a date a user knows, like a date of birth or marriage. (Example: July 21, 1992). +- Use a month, day, year date input component for a date a user knows, like a date of birth or marriage. (Example: July 21, 1992). Or a date they can easily look up (for example, the expiration date of a credit card). - Use the [month year](#monthyear) variant for a date a user can approximate, like a date they graduated from high school or a GED equivalent. (Example: May 2010) ### When to consider something else -If users are trying to schedule something, consider using a calendar picker. +Do not use the date input component if users are unlikely to know the exact date of the event you’re asking about. You may consider using a date picker for scheduling, with the following caveats -**Note:** We do not currently have a calendar picker as part of the design system. For reference, visit the VA online scheduling tool (VAOS) to see an experimental version of a calendar picker. +- We do not currently have a calendar picker as part of the design system. For reference, visit the VA online scheduling tool (VAOS) to see an experimental version of a calendar picker. +- Date pickers have not been tested for accessibility, and may lead to launch blocking issues for your product unless carefully designed with an accessibility specialist. We strongly recommend reaching out to #accessibility-help on slack for support before considering this pattern. ### How to use date inputs diff --git a/src/_components/form/prefill.md b/src/_components/form/prefill.md index b54d0f7cd..f7d840fe9 100644 --- a/src/_components/form/prefill.md +++ b/src/_components/form/prefill.md @@ -15,6 +15,17 @@ anchors: - anchor: Content considerations --- + +
+

+ We may be replacing this page soon. +

+
+
+ ## Examples ### Intro @@ -23,7 +34,7 @@ anchors: {% include_relative html/prefill-intro.html %} -### Step +### Step
{% include_relative html/prefill-step.html %} @@ -42,7 +53,7 @@ anchors: ### How this component works * **Intro variation uses Alert - Informational.** The Intro variation of this component is an instance of the [Alert - Informational]({{ site.baseurl }}/components/alert#informational-alert) component, but without a header. -* **Step variation uses Alert - Background-only Informational.** The Step variations of this component is an instance of the [Alert - Background-only with icon - Informational]({{ site.baseurl }}/components/alert#background-color-only-alert-with-icon) component. +* **Step variation uses Alert - Background-only Informational.** The Step variations of this component is an instance of the [Alert - Background-only with icon - Informational]({{ site.baseurl }}/components/alert#background-color-only-alert-with-icon) component. ### Placement diff --git a/src/_components/form/radio-button.md b/src/_components/form/radio-button.md index 14b189edc..296076c13 100644 --- a/src/_components/form/radio-button.md +++ b/src/_components/form/radio-button.md @@ -13,6 +13,7 @@ anchors: - anchor: Examples - anchor: Usage - anchor: Code usage + - anchor: Content considerations - anchor: Accessibility considerations --- @@ -89,6 +90,11 @@ anchors: {% include component-docs.html component_name=page.web-component %} +## Content considerations + +Refer to our bulleted list guidance for punctuation and general considerations + ## Accessibility considerations -Refer to the U.S. Web Design System for accessibility guidance \ No newline at end of file +Refer to the U.S. Web Design System for accessibility guidance diff --git a/src/_components/form/select.md b/src/_components/form/select.md index 9ebe952b8..863f377b7 100644 --- a/src/_components/form/select.md +++ b/src/_components/form/select.md @@ -47,6 +47,10 @@ anchors: {% include storybook-preview.html story="uswds-va-select--internationalization" link_text="va-select internationalization" %} +### Widths + +{% include storybook-preview.html story="uswds-va-select--widths" link_text="va-select widths" height="800px" %} + ## Usage Refer to the U.S. Web Design System for usage guidance diff --git a/src/_components/html/card-benefit-application-drafts.html b/src/_components/html/card-benefit-application-drafts.html index c044110de..5f1621a38 100644 --- a/src/_components/html/card-benefit-application-drafts.html +++ b/src/_components/html/card-benefit-application-drafts.html @@ -4,15 +4,15 @@

FORM 20-0996

Application for Higher-level review

-
Alert: +
+ + Alert:

Application expires on: June 26, 2023

Last opened on: April 27, 2023

-
\ No newline at end of file diff --git a/src/_components/html/card-benefit-payments.html b/src/_components/html/card-benefit-payments.html index 5cc5ed368..3d43d0272 100644 --- a/src/_components/html/card-benefit-payments.html +++ b/src/_components/html/card-benefit-payments.html @@ -9,9 +9,6 @@

Check mailed on March 31, 2023

- - Review your payment history - + \ No newline at end of file diff --git a/src/_components/icon.md b/src/_components/icon.md index b69de2158..5efc1f51f 100644 --- a/src/_components/icon.md +++ b/src/_components/icon.md @@ -44,10 +44,6 @@ By default, the web component icon will display as `--vads-color-base` which is ``` -### How to migrate from Font Awesome to va-icon - -Follow our detailed instructions on [how to migrate to va-icon]({{ site.baseurl }}/about/developers/using-web-components#how-to-migrate-from-font-awesome-to-va-icon). - ### Icon Sizing Reference diff --git a/src/_components/language-toggle.md b/src/_components/language-toggle.md index 70c9b220f..d9d3cf19d 100644 --- a/src/_components/language-toggle.md +++ b/src/_components/language-toggle.md @@ -4,6 +4,7 @@ title: Language toggle intro-text: "The language toggle is our way of providing translated versions of select pages on va.gov." github-title: va-language-toggle research-title: va-language-toggle +figma-link: https://www.figma.com/design/afurtw4iqQe6y4gXfNfkkk/VADS-Component-Library?node-id=10077-912&t=hljp6A4V60A0rDms-1 status: use-with-caution-available anchors: - anchor: Examples diff --git a/src/_components/link/action.md b/src/_components/link/action.md index c725cdaea..da816957c 100644 --- a/src/_components/link/action.md +++ b/src/_components/link/action.md @@ -18,15 +18,15 @@ anchors: ### Primary -{% include storybook-preview.html height="50px" story="components-va-link-action--default" link_text="va-action-link primary" %} +{% include storybook-preview.html height="50px" story="components-va-link-action--default" link_text="va-link-action primary" %} ### Secondary -{% include storybook-preview.html height="50px" story="components-va-link-action--secondary" link_text="va-action-link secondary" %} +{% include storybook-preview.html height="50px" story="components-va-link-action--secondary" link_text="va-link-action secondary" %} ### Reverse -{% include storybook-preview.html height="67px" story="components-va-link-action--reverse" link_text="va-action-link reverse" %} +{% include storybook-preview.html height="67px" story="components-va-link-action--reverse" link_text="va-link-action reverse" %} ## Usage diff --git a/src/_components/link/html/link-deep-content.html b/src/_components/link/html/link-deep-content.html index 60bfdd035..52ed3fc0d 100644 --- a/src/_components/link/html/link-deep-content.html +++ b/src/_components/link/html/link-deep-content.html @@ -1,6 +1,6 @@

Link copied

diff --git a/src/_components/link/index.md b/src/_components/link/index.md index 4039d0e91..f072e167c 100644 --- a/src/_components/link/index.md +++ b/src/_components/link/index.md @@ -25,27 +25,31 @@ anchors: ### Default -{% include storybook-preview.html story="components-va-link--docs" link_text="va-link" height="75px" %} +{% include storybook-preview.html story="components-va-link--default" link_text="va-link" height="75px" %} + +### Back + +{% include storybook-preview.html story="components-va-link--back" link_text="back va-link" height="50px" %} ### Active -{% include storybook-preview.html story="components-va-link--active" link_text="active va-link" height="25px" %} +{% include storybook-preview.html story="components-va-link--active" link_text="active va-link" height="50px" %} ### Calendar -{% include storybook-preview.html story="components-va-link--calendar" link_text="calendar va-link" height="25px" %} +{% include storybook-preview.html story="components-va-link--calendar" link_text="calendar va-link" height="50px" %} ### Channel -{% include storybook-preview.html story="components-va-link--channel" link_text="channel va-link" height="25px" %} +{% include storybook-preview.html story="components-va-link--channel" link_text="channel va-link" height="50px" %} ### Download -{% include storybook-preview.html story="components-va-link--download" link_text="download va-link" height="25px" %} +{% include storybook-preview.html story="components-va-link--download" link_text="download va-link" height="50px" %} ### Video -{% include storybook-preview.html story="components-va-link--video" link_text="video va-link" height="25px" %} +{% include storybook-preview.html story="components-va-link--video" link_text="video va-link" height="50px" %} ## Usage @@ -60,6 +64,16 @@ anchors: * **Collections, such as Hub pages.** Active links can be seen on [Hub pages]({{ site.baseurl }}/templates/hub#example) * **Less prominent links.** For links that need less prominence than an [Action link]({{ site.baseurl }}/components/link/action) and may appear in a [collection]({{ site.baseurl }}/components/link/collection), we recommend using an Active Link. Active Links have a hover behavior that includes a background color change and an animated right-facing chevron icon for more emphasis. +### When to use a Back link +* **As a replacement for breadcrumb** on: + * Conventional Multi-step Forms that also: + * Have a [minimal header]({{ site.baseurl }}/components/header/header-minimal) and [minimal footer]({{ site.baseurl }}/components/footer/footer-minimal) + * Follow the [one thing per page pattern]({{ site.baseurl }}/patterns/ask-users-for/a-single-response) pattern + * Use the `H1` element to represent the headline for the current form page, rather than the step title in the step indicator + * Include only a `Continue` button and do not have a `Back` button after the form + * Short Forms that has a small amount of short, concise steps. For example, the [Pact Act Wizard](https://staging.va.gov/pact-act-eligibility/introduction). + * Non-Form Pages where the current page was accessed from a related page and does not have additional navigation. For example, an appointment details page. + ### When to use a Calendar link * **Adding an event to a calendar.** Use when the link adds an event to a digital calendar. diff --git a/src/_components/modal/index.md b/src/_components/modal/index.md index 665b40030..4a05d9cab 100644 --- a/src/_components/modal/index.md +++ b/src/_components/modal/index.md @@ -14,7 +14,6 @@ anchors: - anchor: Usage - anchor: Code usage - anchor: Accessibility considerations - - anchor: Component checklist --- {% include _site-in-this-section.html %} diff --git a/src/_components/summary-box.md b/src/_components/summary-box.md index 0dab8d1ae..21de8523e 100644 --- a/src/_components/summary-box.md +++ b/src/_components/summary-box.md @@ -51,7 +51,7 @@ Summary box is found towards the top of the page after the h1 title of the page ### How to use the Summary box component -* Features must use a `h3` or `h4` heading depending on what the appropriate heading level is for your page based on the content of your page. +* Features must use a `h2`, `h3` or `h4` heading depending on what the appropriate heading level is for your page based on the content of your page. * Also supports open text, such as `

`, `

- - - - + + @@ -51,10 +49,6 @@

{{ section[0] }}

- -
Icon v3Icon v3 nameIcon v1FontAwesome classIconValue Usage
{{ icon.icon-name }} - - {{ icon.fa-class }} {% if icon.additional-usage %} {% assign usage = icon.name | append: ', ' | append: icon.additional-usage %} @@ -86,7 +80,7 @@

Requesting a new icon

Search USWDS Icon to see if another existing icon suits your needs. Preferably, choose generic icons that could be reused in various applications. - +

If VADS and USWDS do not contain a suitable icon, you may search Material Icons or browse the official - The float grid is the grid provided by the U.S. Web Design System v1. For a grid that offers more flexibility, see the [flexbox grid](flexbox-grid). - - -{% include _site-on-this-page.html %} - -## Grid examples - -

- -{% include snippet.html content='html/grid.html' %} - -## Implementation - -To use the grid, wrap each grid row in a block-level element (e.g.
,
, etc...) with the usa-grid class. To use a grid without padding on the right and left, use the usa-grid-full class instead. - -Each grid item is written semantically by its width. For example: usa-width-one-half = 1/2 grid item, usa-width-two-thirds = 2/3 grid item. - -Medium breakpoints are used for 1/6 and 1/12 grid items, which both transform into a 1/3 grid item at medium screen sizes. - -All grid items are full-width at small screen sizes. - -### Accessibility - -- Low-vision users should be able to increase the size of the text by up to 200 percent without breaking the layout. - -### Usability - -#### When to use - -- Almost always use a grid layout — visitors can read more quickly on pages that use grids. Choose a single grid system for your entire site. - -#### When to consider something else - -- Avoid mixing this grid and other grid systems. - -#### Guidance - -- Choose a 12-column grid with flexible column widths and fixed gutters. The width of the padding on the left and right edge of the grid depends on device size. -- Avoid text lines longer than 75 characters. Place text in narrower grid boxes to keep text lines from becoming too wide. - diff --git a/src/_foundation/layout/index.md b/src/_foundation/layout/index.md index 2dcfc3114..ff245b229 100644 --- a/src/_foundation/layout/index.md +++ b/src/_foundation/layout/index.md @@ -4,7 +4,6 @@ permalink: /foundation/layout/ title: Layout sub-pages: - sub-page: Flexbox grid - - sub-page: Float grid - sub-page: Page layouts --- @@ -16,9 +15,9 @@ sub-pages: {% include _site-in-this-section.html %} -## Grids +## Flexbox grid -We have two types of grids. One is the float grid (whereas "float" refers to the `float` CSS property) provide by the U.S. Web Design System. The other grid is a flexbox grid (which refers to the `flexbox` CSS spec) that provides more design flexibility and options to use with responsive design. A similar flexbox grid will be offered in the U.S. Web Design System version 2.0. +The flexbox grid (which refers to the `flexbox` CSS spec) provides more design flexibility and options to use with responsive design. ## Page layouts diff --git a/src/_foundation/typography.md b/src/_foundation/typography.md index 63fe92fd7..0a32e9ae3 100644 --- a/src/_foundation/typography.md +++ b/src/_foundation/typography.md @@ -6,8 +6,8 @@ anchors: - anchor: Fonts - anchor: Headings - anchor: Paragraphs - - anchor: Lists - anchor: Typography tokens + - anchor: Related --- # Typography @@ -172,4 +172,8 @@ Don’t change heading level in order to use a different font size. ### Semantic typography tokens {% assign font_semantic = site.data.tokens.vads-font-semantic %} -{% include tokens.html tokens=font_semantic %} \ No newline at end of file +{% include tokens.html tokens=font_semantic %} + +## Related + +* [List]({{ site.baseurl }}/components/list) \ No newline at end of file diff --git a/src/_foundation/utilities/html/position.html b/src/_foundation/utilities/html/position.html new file mode 100644 index 000000000..7b822a772 --- /dev/null +++ b/src/_foundation/utilities/html/position.html @@ -0,0 +1,14 @@ +
+
+

Elements positioned

+
+ Positioning on mobile breakpoint and larger +
+
+ Positioning on medium-screen breakpoint and larger +
+
+ Positioning on desktop breakpoint and larger +
+
+
\ No newline at end of file diff --git a/src/_foundation/utilities/index.md b/src/_foundation/utilities/index.md index 2d867a659..c603d5907 100644 --- a/src/_foundation/utilities/index.md +++ b/src/_foundation/utilities/index.md @@ -8,7 +8,7 @@ sub-pages: - sub-page: Display - sub-page: Flexbox - sub-page: Font family - - sub-page: Font size + - sub-page: Font size - sub-page: Font style - sub-page: Font weight - sub-page: Height and width @@ -16,6 +16,7 @@ sub-pages: - sub-page: Margins - sub-page: Measure - sub-page: Padding + - sub-page: Position - sub-page: Text align - sub-page: Text color - sub-page: Text decoration @@ -59,9 +60,11 @@ Be descriptive, use the global & utility prefixes, and avoid creating ambiguity Use descriptive class names that clearly indicate the associated CSS property. #### Example + ```css .vads-u-margin-bottom--5 ``` +
@@ -70,9 +73,11 @@ Use descriptive class names that clearly indicate the associated CSS property. Don’t use acroynms or shorthand, ambiguous class names that do not clearly indicate the associated CSS property. #### Example + ```css .vads-u-mb5 ``` +
diff --git a/src/_foundation/utilities/position.md b/src/_foundation/utilities/position.md new file mode 100644 index 000000000..c96a83fa9 --- /dev/null +++ b/src/_foundation/utilities/position.md @@ -0,0 +1,48 @@ +--- +layout: default +permalink: /foundation/utilities/position +has-parent: /foundation/utilities/ +title: Position +--- + +# Position + +
+Change the positioning of text or elements. Position classes include [responsive prefixes](#responsive-prefixes). +
+ +
+ {% + include _showcase-header.html + heading_level=2 + header="Position" + responsive=true + css_property="position" + %} +
+ {% for item in site.data.position.position %} +
+
+ .vads-u-position--{{ item.name }} +
+
+

{{ item.description }}

+
+
+ {% endfor %} +
+
+ +## Responsive prefixes + +Add a responsive breakpoint prefix separated with a : to target a utility at a responsive breakpoint and higher, following a mobile-first methodology. + +{% include snippet.html content='html/position.html' %} + +### Example + +```html +
+``` + +{% include _breakpoint-names.html %} diff --git a/src/_includes/_banner-whats-new.html b/src/_includes/_banner-whats-new.html index d2aa1de17..121ed5579 100644 --- a/src/_includes/_banner-whats-new.html +++ b/src/_includes/_banner-whats-new.html @@ -1,9 +1,9 @@ -
+ \ No newline at end of file diff --git a/src/_includes/_breakpoint-names.html b/src/_includes/_breakpoint-names.html index 862052cac..ab385baef 100644 --- a/src/_includes/_breakpoint-names.html +++ b/src/_includes/_breakpoint-names.html @@ -1,29 +1,40 @@ - + + + + + + + + + + - + + + diff --git a/src/_includes/_component-checklist.html b/src/_includes/_component-checklist.html index b927c5faa..4b41bbf0b 100644 --- a/src/_includes/_component-checklist.html +++ b/src/_includes/_component-checklist.html @@ -3,6 +3,7 @@ {% assign component = components | map: name %} {% assign definitions = components | map: "definitions" %} +

Component checklist

{% for definition in definitions %} @@ -18,33 +19,38 @@

Component checklist

{{ title | replace: "-", " " | capitalize }}

-
- {% for item in items %} - {% assign name = item.name %} - {% assign values = component.first[title] %} - {% assign slug_name = name | slugify %} - {% assign value = values | where: "name", slug_name %} - {% assign score = value.first.score %} - {% assign notes = value.first.notes %} -
- {% if score == true %} - {% assign completed_items = completed_items | plus: 1 %} - {% assign total_items = total_items | plus: 1 %} - - {% elsif score == "n/a" %} - - {% elsif score == false %} - {% assign total_items = total_items | plus: 1 %} - - {% endif %} - {{ name }} -
-
{{ item.desc }}
- {% if notes %} -
Note: {{ notes }}
- {% endif %} - {% endfor %} -
+ + {% if section[0] == "accessibility" %} + {% include a11y/a11y-checklist.html name=include.component_name %} + {% else %} +
+ {% for item in items %} + {% assign name = item.name %} + {% assign values = component.first[title] %} + {% assign slug_name = name | slugify %} + {% assign value = values | where: "name", slug_name %} + {% assign score = value.first.score %} + {% assign notes = value.first.notes %} +
+ {% if score == true %} + {% assign completed_items = completed_items | plus: 1 %} + {% assign total_items = total_items | plus: 1 %} + + {% elsif score == "n/a" %} + + {% elsif score == false %} + {% assign total_items = total_items | plus: 1 %} + + {% endif %} + {{ name }} +
+
{{ item.desc }}
+ {% if notes %} +
Note: {{ notes }}
+ {% endif %} + {% endfor %} +
+ {% endif %} {% endfor %} diff --git a/src/_includes/_side-nav.html b/src/_includes/_side-nav.html index c0d53b55a..1df29969c 100644 --- a/src/_includes/_side-nav.html +++ b/src/_includes/_side-nav.html @@ -44,7 +44,7 @@ {% assign is-current = false %} {% endif %}
  • - + {{ item.sub-page }} {%- if include.name == 'components' -%} {%- include _site-side-nav-status.html components=sortedPages component=item.sub-page parent=p.title -%} diff --git a/src/_includes/_site-in-this-section.html b/src/_includes/_site-in-this-section.html index ffd48cf50..0d5bc6cc8 100644 --- a/src/_includes/_site-in-this-section.html +++ b/src/_includes/_site-in-this-section.html @@ -8,7 +8,7 @@
    {{ item.sub-page }} diff --git a/src/_includes/a11y/a11y-checklist.html b/src/_includes/a11y/a11y-checklist.html new file mode 100644 index 000000000..f0232c7c4 --- /dev/null +++ b/src/_includes/a11y/a11y-checklist.html @@ -0,0 +1,61 @@ +{% assign component-found = false %} + +{% for component in site.data.component-checklist.a11y.a11y-audit %} + {% if component["Name"] == include.name %} + {% assign component-found = true %} + {% assign row = site.data.component-checklist.a11y.a11y-audit[forloop.index0] %} + +

    + For more information on each category, see Accessibility testing for design system components. +

    + + {% for name_value_pair in row %} + {% if name_value_pair[0] != "Name" %} +
    +
    + {%if name_value_pair[0] != "Last audit date" %} + {% if name_value_pair[1] contains "Pass with exceptions" %} + {% assign completed_items = completed_items | plus: 1 %} + {% assign total_items = total_items | plus: 1 %} + + {% elsif name_value_pair[1] contains "Pass" %} + {% assign completed_items = completed_items | plus: 1 %} + {% assign total_items = total_items | plus: 1 %} + + {% elsif name_value_pair[1] contains "Conditional" %} + {% assign completed_items = completed_items | plus: 1 %} + {% assign total_items = total_items | plus: 1 %} + + {% elsif name_value_pair[1] contains "Fail" %} + {% assign total_items = total_items | plus: 1 %} + + {% else %} + {% assign total_items = total_items | plus: 1 %} + + {% endif %} + {% endif %} + + {{ name_value_pair[0] }} +
    + + {% if name_value_pair[1] %} +
    {{ name_value_pair[1] }}
    + {% else %} +
    This category has not been tested.
    + {% endif %} + + {% if name_value_pair[1] contains "Conditional" %} +

    + Note: This category is dependent on how you use this component. Test this for accessibility in your project. +

    + {% endif %} +
    + {%endif%} + {% endfor %} + {% endif %} +{% endfor %} + + +{% if component-found == false %} +

    While this component has been previously tested against older criteria, it has not yet been audited with the updated testing criteria.

    +{% endif %} diff --git a/src/_includes/component-resource-links.html b/src/_includes/component-resource-links.html index bed06e5f1..111c03393 100644 --- a/src/_includes/component-resource-links.html +++ b/src/_includes/component-resource-links.html @@ -31,9 +31,15 @@ {% endif %} {% if research_component_name %}
    {% endif %} {% if page.figma-link %} diff --git a/src/_includes/content/phone-numbers.md b/src/_includes/content/phone-numbers.md index 6502405bc..fc49eb23f 100644 --- a/src/_includes/content/phone-numbers.md +++ b/src/_includes/content/phone-numbers.md @@ -11,10 +11,12 @@ Using the [Telephone component]({{ site.baseurl }}/components/telephone) will ap * Use a verb ahead of the number. Use "call" or "call us at..." for phone numbers and "text" or "text us at" for text numbers. * When a phone number has (TTY: 711) included, it should be formatted in parenthesis directly following the phone number. Example: 866-440-1238 (TTY: 711) or 866-440-1238, ext. 4 (TTY: 711) -### Links -* Hyperlink all phone numbers, including TTY numbers. It’s not a requirement to link the "call" or "text" verb that precedes the number. We do however include "TTY" in the link and aria label to make it clear that it's specifically for TTY so that users who need the service see it and so those who do not do not unintentionally call a TTY number. +### Links and aria +* Hyperlink all phone numbers, including (TTY: 711). Include "TTY:" in the link. Don't link the "call" or "text" verb that precedes the number. +Example: ` 202-123-1234 (TTY: 711)` +* **New guidance as of August 2024:** You no longer need to use aria labels on phone numbers or TTY. This shift came out of evolving accessibility guidance for people who use assistive technology. Teams should stop adding aria labels to phone numbers and TTY in new content, but the shift will take time to implement on existing content. If you have questions, contact the Sitewide Content, Accessibility, and Information Architecture (CAIA) team. -If for some reason you cannot use the Telephone component, you are responsible for meeting the same formatting and accessibility guidance when creating links to phone numbers. +**Note:** If for some reason you cannot use the Telephone component, you are responsible for meeting the same formatting and accessibility guidance when creating links to phone numbers. ### Don't use vanity phone numbers in body copy We don’t use vanity phone numbers in body copy, as it adds visual noise and is not helpful to screen readers. We use and hyperlink only the numeric phone number in body copy. diff --git a/src/_includes/content/sign-in-alert-examples.md b/src/_includes/content/sign-in-alert-examples.md new file mode 100644 index 000000000..18b434a5b --- /dev/null +++ b/src/_includes/content/sign-in-alert-examples.md @@ -0,0 +1,14 @@ +### Required sign-in (verified) +{% include component-example.html alt="An example of a sign-in alert for all products that require sign-in with a verified account." file="/images/components/alert-sign-in/required-sign-in-verified.png" caption="An example of a sign-in alert for all products that require sign-in with a verified account" reverse=true %} + +### Optional sign-in (verified) +{% include component-example.html alt="An example of a sign-in alert for forms that support optional sign-in with a verified account." file="/images/components/alert-sign-in/optional-sign-in-verified.png" caption="An example of a sign-in alert for forms that support optional sign-in with a verified account." reverse=true %} + +### Verify with ID.me +{% include component-example.html alt="An example of a sign-in alert for unverified ID.me accounts" file="/images/components/alert-sign-in/verify-with-idme.png" caption="An example of a sign-in alert for unverified ID.me accounts" reverse=true %} + +### Verify with Login.gov +{% include component-example.html alt="An example of a sign-in alert for unverified Login.gov accounts." file="/images/components/alert-sign-in/verify-with-logingov.png" caption="An example of a sign-in alert for unverified Login.gov accounts." reverse=true %} + +### Sign in with a different account +{% include component-example.html alt="An example of a sign-in alert for unverified My HealtheVet accounts." file="/images/components/alert-sign-in/sign-in-with-a-different-account.png" caption="An example of a sign-in alert for unverified My HealtheVet accounts." reverse=true %} diff --git a/src/_includes/header.html b/src/_includes/header.html index a750fe159..a4b9312ba 100644 --- a/src/_includes/header.html +++ b/src/_includes/header.html @@ -50,7 +50,7 @@
  • Breakpoint sass variableVADS Breakpoint Sass VariableUSWDS Breakpoint Custom Property Width
    $xsmall-screen--mobile 320px
    $small-screen--mobile-lg 481px
    ----tablet640px
    $medium-screen--medium-screen 768px
    $small-desktop-screen1008px--desktop1024px
    $large-screen--desktop-lg 1201px