Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 3515c1a

Browse files
authored
Merge pull request #6106 from department-of-veterans-affairs/fix/pattern-link-formatting
Update pattern link formatting and improve consistency
2 parents 912b479 + 23ef0a0 commit 3515c1a

14 files changed

Lines changed: 146 additions & 26 deletions

File tree

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
applyTo: "src/**/*.md"
3+
---
4+
5+
# Pattern page link formatting
6+
7+
When creating or reviewing links to pattern pages, always use the full URL path including the category subdirectory.
8+
9+
## Pattern URL structure
10+
11+
Pattern pages primarily use these category subdirectories:
12+
- `ask-users-for` — Patterns for collecting information from users
13+
- `help-users-to` — Patterns for helping users accomplish tasks
14+
- `html` — HTML pattern content stored under `src/_patterns/html/`
15+
16+
**Required link format**: `/patterns/[category]/[pattern-name]`
17+
18+
## Link text formatting rules
19+
20+
**Pattern link text must:**
21+
1. **Capitalize only the first letter** of the pattern name in the link text (e.g. "Ask users for" or "Help users to"). The rest of the pattern name uses sentence case — no mid-word capitals except for proper nouns (e.g., "Social Security number") and acronyms. For example:
22+
-`[Ask users for names]` — "names" is all lowercase
23+
-`[Ask users for a Social Security number]` — "Social Security" is a proper noun
24+
-`[Help users to update prefilled information]` — "update" and "prefilled" are lowercase
25+
-`[Ask users for Names]` — "Names" is not a proper noun and should not be capitalized
26+
-`[Help users to Update prefilled information]` — "Update" should be lowercase
27+
-`[Help users to Know when...]` — "Know" should be lowercase
28+
2. **Never include ellipses** (`...` or ``)
29+
3. **Never include quotes** around or within the link text, including:
30+
-`["Help users to..." pattern]` — Quotes around the link text
31+
-`[Help users to "update" information]` — Quotes within the link text
32+
-`["Update prefilled information"]` — Quotes around entire link text
33+
4. Include the category prefix when the context requires it
34+
35+
## Examples
36+
37+
**Correct link text:**
38+
-`[Names]({{ site.baseurl }}/patterns/ask-users-for/names)`
39+
-`[Phone numbers]({{ site.baseurl }}/patterns/ask-users-for/phone-numbers)`
40+
-`[Ask users for names]({{ site.baseurl }}/patterns/ask-users-for/names)`
41+
-`[Ask users for a single response]({{ site.baseurl }}/patterns/ask-users-for/a-single-response)`
42+
-`[Update prefilled information]({{ site.baseurl }}/patterns/help-users-to/update-prefilled-information)`
43+
-`[Help users to update prefilled information]({{ site.baseurl }}/patterns/help-users-to/update-prefilled-information)`
44+
-`[Complete a sub-task]({{ site.baseurl }}/patterns/help-users-to/complete-a-sub-task)`
45+
- ✅ With anchor: `[Dates]({{ site.baseurl }}/patterns/ask-users-for/dates#content-considerations)`
46+
47+
**Incorrect link text:**
48+
-`[ask users for names]` — First letter not capitalized
49+
-`[Ask users for... names]` — Contains ellipses
50+
-`[Help users to... Update prefilled information]` — Contains ellipses AND mid-word capital
51+
-`["Update prefilled information" pattern]` — Contains quotes
52+
-`[Ask users for… names]` — Contains ellipsis character
53+
-`[Help users to Know when...]` — Mid-word capital ("Know" should be "know")
54+
-`[Help users to Update Prefilled information]` — Mid-word capitals ("Update" and "Prefilled" should be lowercase)
55+
-`["Help users to manage benefits" pattern]` — Quotes around link text
56+
- ❌ The `"[Help users to update...]"` pattern — Quotes wrapping the entire markdown link
57+
58+
**Incorrect URLs:**
59+
-`/patterns/names` — Missing category subdirectory
60+
-`/patterns/update-prefilled-information` — Missing category subdirectory
61+
-`patterns/help-users-to/names` — Missing leading slash
62+
- ❌ Relative paths like `../patterns/help-users-to/names`
63+
64+
## Pattern name formatting in text
65+
66+
When referencing patterns in prose:
67+
- Use the pattern's official title as written on the pattern page, and keep capitalization consistent
68+
- Include "pattern" when first mentioned: "the Update prefilled information pattern"
69+
- Link pattern names on first reference per page
70+
- You may refer to the category in prose: "the Ask users for... patterns" or "the Help users to... category"
71+
72+
## Common pattern links
73+
74+
**Ask users for... patterns:**
75+
- Addresses: `/patterns/ask-users-for/addresses`
76+
- Dates: `/patterns/ask-users-for/dates`
77+
- Email address: `/patterns/ask-users-for/email-address`
78+
- Names: `/patterns/ask-users-for/names`
79+
- Phone numbers: `/patterns/ask-users-for/phone-numbers`
80+
- Signature: `/patterns/ask-users-for/signature`
81+
- Single response: `/patterns/ask-users-for/a-single-response`
82+
- Social Security or VA file number: `/patterns/ask-users-for/social-security-number`
83+
84+
**Help users to... patterns:**
85+
- Complete a sub-task: `/patterns/help-users-to/complete-a-sub-task`
86+
- Know when their information is prefilled: `/patterns/help-users-to/know-when-their-information-is-prefilled`
87+
- Update prefilled information: `/patterns/help-users-to/update-prefilled-information`
88+
89+
## Validation checklist
90+
91+
When reviewing or editing pattern links, check for:
92+
93+
1. **Capitalization errors:**
94+
- ✅ First letter of pattern name is capitalized (or lowercase if mid-sentence reference)
95+
- ✅ Proper nouns and acronyms retain their standard capitalization (e.g., "Social Security number")
96+
- ❌ Unnecessary mid-word capitals like "Know", "Update", "Prefilled", "Names" (not proper nouns)
97+
- Search patterns: `[Help users to [A-Z]`, `[Ask users for [A-Z][a-z]+ [A-Z]`
98+
99+
2. **Ellipsis errors:**
100+
- ❌ Three-dot ellipsis `...` in link text
101+
- ❌ Em dash ellipsis `` in link text
102+
- Search pattern: `\.\.\.|…` in links to pattern pages
103+
104+
3. **Quote errors:**
105+
- ❌ Quotes around the full link text: `["pattern name"]`
106+
- ❌ Quotes before the opening bracket: `"[pattern name]"`
107+
- ❌ Quotes inside link text: `["pattern" name]`
108+
- Search patterns: `"\[.*patterns/(ask-users-for|help-users-to)`, `\[".*"\]`
109+
110+
4. **URL structure:**
111+
- ✅ Full path with category: `/patterns/[category]/[pattern-name]`
112+
- ❌ Missing category subdirectory
113+
- ❌ Missing leading slash or using relative paths
114+
115+
## Finding the correct path
116+
117+
To verify a pattern's URL:
118+
1. Check the pattern's markdown file in `src/_patterns/[category]/`
119+
2. Look at the `permalink` field in the YAML front matter
120+
3. Use that exact path in your link

src/_components/alert/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Displaying multiple alerts should be avoided. However, when you need to display
298298
<p>
299299
<va-link-action
300300
href="{{ site.baseurl }}/patterns/help-users-to/recover-from-errors"
301-
text="Review the Help users to...Recover from errors pattern"
301+
text="Review the Help users to recover from errors pattern"
302302
type="secondary"
303303
></va-link-action>
304304
</p>

src/_components/form/telephone-input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Whenever the component is modified it emits a `vaContact` event that includes th
6363

6464

6565
## Content considerations
66-
Content for both variations can be found in [Ask users for... Phone numbers pattern]({{ site.baseurl }}/patterns/ask-users-for/phone-numbers).
66+
Content for both variations can be found in [Ask users for phone numbers pattern]({{ site.baseurl }}/patterns/ask-users-for/phone-numbers).
6767

6868
## Accessibility considerations
6969

src/_components/service-list-item.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: component
33
title: Service List Item
4-
intro-text: The Service List Item summarizes a benefit or tool. For example, a Service List Item could show the most important details about an appointment, prescription, or benefit. It shows high-level details, offers a link to view more information, and can alert the user to any actions that need to be taken. It is always displayed in a list, as described in the “Help Users to… Manage Benefits and Tools” pattern.
4+
intro-text: The Service List Item summarizes a benefit or tool. For example, a Service List Item could show the most important details about an appointment, prescription, or benefit. It shows high-level details, offers a link to view more information, and can alert the user to any actions that need to be taken. It is always displayed in a list, as described in the “Help users to manage benefits and tools” pattern.
55
research-title: Service List Item
66
figma-link-web: https://www.figma.com/design/afurtw4iqQe6y4gXfNfkkk/VADS-Component-Library?m=auto&node-id=31161-83&t=HFKAGuzWFnrLMXTF-1
77
contributors: Lynn Stahl (Agile Six), Adam Whitlock (Ad Hoc), Belle Poopongpanit (Agile Six), Christine Rose Steiffer (Agile Six), Kristen Faiferlick (Ad Hoc)
@@ -42,7 +42,7 @@ anchors:
4242
* **Benefit**: Aid or assistance provided by VA to Veterans, family members, or caretakers. Examples include health care, education and training, disability compensation, life insurance, and pension.
4343
* **Tool**: A digital product that Veterans, family members, or caretakers use to manage benefits. Examples include appointments, prescriptions, payments, secure messages, and claims.
4444
* **Service**: A term used to describe both benefits and tools.
45-
* **Service List**: A list of services. The [Help Users to… Manage Benefits and Tools” pattern]({{ site.baseurl }}/patterns/help-users-to/manage-benefits-and-tools) describes how to build a Service list.
45+
* **Service List**: A list of services. The [Help users to manage benefits and tools pattern]({{ site.baseurl }}/patterns/help-users-to/manage-benefits-and-tools) describes how to build a Service list.
4646
* **Service List Item**: An item in a service list. Each item contains a summary of the benefit or tool, with a link to for the user to get more information. This component explains how to use and build a Service List Item.
4747

4848
### When to use Service List Item

src/_includes/content/addresses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ New York, NY 67890 <br/>
3636
### Zip codes and postal codes
3737

3838
- When we know an address is a U.S. address, use “zip code.” If the address is outside the U.S. or if you’re unsure of the country, use “postal code.”<br>
39-
**Note:** The [Ask users for…Addresses pattern](https://design.va.gov/patterns/ask-users-for/addresses) uses “postal code” for the field label. But the error message will say “Enter a valid 5-digit zip code” if we know the address is in the U.S.
39+
**Note:** The [Ask users for addresses pattern](https://design.va.gov/patterns/ask-users-for/addresses) uses “postal code” for the field label. But the error message will say “Enter a valid 5-digit zip code” if we know the address is in the U.S.
4040
- When Veterans fill out their address, we don’t require them to include the extra 4 digits of their zip code. They only need to provide the 5-digit zip code.
4141
- When we provide an address to Veterans, we sometimes include the extra 4 digits of the zip code. If we include the extra 4 digits, use a hyphen (ex. 12345-6789).

src/_includes/content/whats-new/december-2025.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ When possible, keep error and alert message titles (headings) to 50 characters,
6363

6464
### Patterns
6565

66-
#### [Help users to... Recover from errors](https://design.va.gov/patterns/help-users-to/recover-from-errors)
66+
#### [Help users to recover from errors](https://design.va.gov/patterns/help-users-to/recover-from-errors)
6767

6868
- Made style guide edits throughout **Step 1** to match current guidance
6969
- Added guidance on heading/title length:

src/_patterns/ask-users-for/files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Use the [File input]({{ site.baseurl }}/components/form/file-input) component al
7272
#### Multiple file upload
7373

7474
* If users only need to upload files and don't need to answer separate questions about each one, use the multiple file upload pattern. This pattern lets users add files one at a time (not as a single batch selection) and review or remove each file before continuing.
75-
* If users also need to provide additional information about each file, use the [Ask for... Multiple Responses]({{ site.baseurl }}/patterns/ask-users-for/multiple-responses) pattern with single file upload inputs.
75+
* If users also need to provide additional information about each file, use the [Ask users for multiple responses]({{ site.baseurl }}/patterns/ask-users-for/multiple-responses) pattern with single file upload inputs.
7676

7777
#### Additional questions about the file
7878

src/_patterns/ask-users-for/housing-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Answering in the affirmative to "I have another housing risk not listed here" se
5656

5757
{% include component-example.html alt="An example of asking users for other housing risks." file="/images/patterns/ask-users-for/housing-status/other-housing-risks.png" caption="An example of asking a user if they have other housing risks." class="x2" %}
5858

59-
Answering in the affirmative to "None of these situations apply to me" sends the user to the mailing address page which users our [address pattern]({{ site.baseurl }}/patterns/ask-users-for/addresses). They do not see the conditional page asking if they have a mailing address or not.
59+
Answering in the affirmative to "None of these situations apply to me" sends the user to the mailing address page which uses [Ask users for addresses pattern]({{ site.baseurl }}/patterns/ask-users-for/addresses). They do not see the conditional page asking if they have a mailing address or not.
6060

6161
In addition, it may be appropriate to ask the user for a point of contact to assist us in contacting the person submitting the form.
6262

src/_patterns/ask-users-for/marital-information.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ This optional section features the [Multiple Responses]({{ site.baseurl }}/patte
118118

119119
* If a form requires file uploads (for example, a marriage certificate or divorce decree), state that these files are needed on the form introduction page.
120120
* As the user moves through the form, if they provide a response that triggers conditionally-required file uploads, explain why the file upload is needed. For example, if a user indicates that they were married in a way that is not among the standard responses, include text like this: "Based on your answer, you'll need to provide supporting documents to help us understand your marital status. We'll ask you to upload these documents on the next screen [or on the final screen of the form, depending on your form's situation]."
121-
* If you are asking only one question on a page, the question label should be an h3, as shown in the [Ask Users For... A Single Response]({{ site.baseurl }}/patterns/ask-users-for/a-single-response#annotated) pattern. However, if you are asking multiple questions per page, give the page a descriptive page title as an h3 and use standard (non-header) labels for questions.
121+
* If you are asking only one question on a page, the question label should be an h3, as shown in the [Ask users for a single response]({{ site.baseurl }}/patterns/ask-users-for/a-single-response#annotated) pattern. However, if you are asking multiple questions per page, give the page a descriptive page title as an h3 and use standard (non-header) labels for questions.
122122

123123

124124
## Code usage

src/_patterns/ask-users-for/multiple-responses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Use this pattern when users need to add similar information multiple times, such
5151

5252
### When to not use multi-page
5353

54-
* **Most of the information being requested is already available.** If we have most of the information being requested already then the "Add item" variation is preferred. If the information we have on file is contact information coming from VA Profile API then the [Help users to... update prefilled information pattern]({{ site.baseurl }}/patterns/help-users-to/update-prefilled-information) is preferred.
54+
* **Most of the information being requested is already available.** If we have most of the information being requested already then the "Add item" variation is preferred. If the information we have on file is contact information coming from VA Profile API then the [Help users to update prefilled information pattern]({{ site.baseurl }}/patterns/help-users-to/update-prefilled-information) is preferred.
5555

5656
### Required vs Optional multi-page patterns
5757

0 commit comments

Comments
 (0)