Skip to content

Commit fe5a3ab

Browse files
fix(form): fix pattern links (#4322)
* fix(form): fix pattern links * fix(form): update links --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent bf56660 commit fe5a3ab

File tree

1 file changed

+9
-8
lines changed
  • packages/paste-website/src/pages/patterns/form

1 file changed

+9
-8
lines changed

packages/paste-website/src/pages/patterns/form/index.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import {
6767
import {UnorderedList, OrderedList, ListItem} from '@twilio-paste/list'
6868
import {Table, THead, Tr, Th, TBody, Td, TFoot} from '@twilio-paste/table';
6969
import { Blockquote, BlockquoteContent, BlockquoteCitation } from "@twilio-paste/blockquote";
70+
import {InlineCode} from '@twilio-paste/inline-code';
7071

7172
import DefaultLayout from '../../../layouts/DefaultLayout';
7273
import {getFeature, getNavigationData} from '../../../utils/api';
@@ -166,7 +167,7 @@ Before designing a form you should:
166167
<UnorderedList>
167168
<ListItem>Don't ask for the same information twice in the same session. Reference: <Anchor href="https://www.w3.org/WAI/WCAG22/Understanding/redundant-entry">WCAG</Anchor></ListItem>
168169
<ListItem>Provide accessible error identification and messaging. Reference: <Anchor href="https://www.w3.org/WAI/WCAG22/Understanding/error-identification">WCAG</Anchor></ListItem>
169-
<ListItem>Group related fields using fieldsets and legends with `FormSection` and `FormSectionHeading` from the <Anchor href="/components/form">Form layout component</Anchor>, which render an HTML fieldset and legend. Reference: <Anchor href="https://webaim.org/techniques/forms/controls">WebAIM</Anchor></ListItem>
170+
<ListItem>Group related fields using fieldsets and legends with <InlineCode>FormSection</InlineCode> and <InlineCode>FormSectionHeading</InlineCode> from the <Anchor href="/components/form-layout">Form layout component</Anchor>, which render an HTML fieldset and legend. Reference: <Anchor href="https://webaim.org/techniques/forms/controls">WebAIM</Anchor></ListItem>
170171
<ListItem>The order in which form elements are presented on a webpage should be logical and meaningful. Reference: <Anchor href="https://www.w3.org/WAI/WCAG22/Understanding/meaningful-sequence.html">WCAG</Anchor></ListItem>
171172
</UnorderedList>
172173

@@ -184,7 +185,7 @@ The different parts of a form are:
184185

185186
<UnorderedList>
186187
<ListItem>
187-
<strong><Anchor href="/components/form">Form layout component</Anchor></strong>: A wrapper layout component that sets layout and spacing between form elements.
188+
<strong><Anchor href="/components/form-layout">Form layout component</Anchor></strong>: A wrapper layout component that sets layout and spacing between form elements.
188189
</ListItem>
189190
<ListItem>
190191
<strong>Form element</strong>: Any UI component in a form. Examples: <Anchor href="/components/input">Input</Anchor>, <Anchor href="/components/button">Button</Anchor>, <Anchor href="/components/callout">Callout</Anchor>.
@@ -214,7 +215,7 @@ The different parts of a form are:
214215
</THead>
215216
<TBody>
216217
<Tr verticalAlign="top">
217-
<Td><Anchor href="/components/form">Form layout</Anchor></Td>
218+
<Td><Anchor href="/components/form-layout">Form layout</Anchor></Td>
218219
<Td>Arranges a layout of form elements with preset spacing.</Td>
219220
</Tr>
220221
<Tr verticalAlign="top">
@@ -382,7 +383,7 @@ Use single-step forms for:
382383
Tasks that users can complete in one go without interruptions or needing external references.
383384
</ListItem>
384385
<ListItem>
385-
Low cognitive load forms that require a maximum of 8 fields. For longer forms, use a <Anchor href="https://docs.google.com/document/d/1sYcP_i_YTwYWWdjKDQfkIdMj1NqyZV5c_8k4BxrEYc0/edit?pli=1&tab=t.0#heading=h.yi4naptd6s8d">Multi-step</Anchor> form or for settings, use the <Anchor href="/page-templates/settings">Settings</Anchor> template and divide the fields with In Page Navigation or Tabs.
386+
Low cognitive load forms that require a maximum of 8 fields. For longer forms, use a <Anchor href="#multi-step-forms">Multi-step</Anchor> form or for settings, use the <Anchor href="/page-templates/settings">Settings</Anchor> template and divide the fields with In Page Navigation or Tabs.
386387
</ListItem>
387388
</UnorderedList>
388389

@@ -659,7 +660,7 @@ Inline forms use our [Popover](/components/popover) component. Use Inline forms
659660
## Composition
660661

661662
Designing a good form requires making decisions about composition, sequence, form elements, copy, and feedback.
662-
Use the [Form layout component](/components/form) to arrange a layout of form elements with preset spacing.
663+
Use the [Form layout component](/components/form-layout) to arrange a layout of form elements with preset spacing.
663664

664665
### Number of form elements
665666

@@ -705,7 +706,7 @@ When ordering your form, place fields in a logical order from a user’s perspec
705706

706707
#### Organization: When to break into sections or new pages
707708

708-
After determining the number of form fields, decide how to group them into sections, using `FormSection` from the [Form layout component](/components/form). If a form naturally breaks down into short sections, a [single step form](https://docs.google.com/document/d/1sYcP_i_YTwYWWdjKDQfkIdMj1NqyZV5c_8k4BxrEYc0/edit?pli=1&tab=t.0#heading=h.3vpocpbk0gl7) is likely to be a good way to organize the form. When a form becomes long and has more than 8 questions that are only related by a few topics, [multi-step form](https://docs.google.com/document/d/1sYcP_i_YTwYWWdjKDQfkIdMj1NqyZV5c_8k4BxrEYc0/edit?pli=1&tab=t.0#heading=h.yi4naptd6s8d) would be a better way to organize the form.
709+
After determining the number of form fields, decide how to group them into sections, using `FormSection` from the [Form layout component](/components/form-layout). If a form naturally breaks down into short sections, a [single step form](#single-step-or-page-forms) is likely to be a good way to organize the form. When a form becomes long and has more than 8 questions that are only related by a few topics, [multi-step form](#multi-step-forms) would be a better way to organize the form.
709710

710711
### Form field composition
711712

@@ -818,10 +819,10 @@ The primary Button placement depends on the form type:
818819

819820
<UnorderedList>
820821
<ListItem>
821-
For <Anchor href="https://docs.google.com/document/d/1sYcP_i_YTwYWWdjKDQfkIdMj1NqyZV5c_8k4BxrEYc0/edit?pli=1&tab=t.0#heading=h.3vpocpbk0gl7">Single Step Forms</Anchor>, <Anchor href="/components/side-modal">Side Modals</Anchor>, <Anchor href="/components/side-panel">Side Panels</Anchor>, <Anchor href="/components/minimizable-dialog">Minimizable Dialogs</Anchor> and <Anchor href="https://docs.google.com/document/d/1sYcP_i_YTwYWWdjKDQfkIdMj1NqyZV5c_8k4BxrEYc0/edit?pli=1&tab=t.0#heading=h.7xhk5supgjav">Popover</Anchor> forms, keep the primary button left-aligned, and placed before secondary buttons for better scannability of the content and its related actions.
822+
For <Anchor href="#single-step-or-page-forms">Single Step Forms</Anchor>, <Anchor href="/components/side-modal">Side Modals</Anchor>, <Anchor href="/components/side-panel">Side Panels</Anchor>, <Anchor href="/components/minimizable-dialog">Minimizable Dialogs</Anchor> and <Anchor href="#inline-forms">Popover</Anchor> forms, keep the primary button left-aligned, and placed before secondary buttons for better scannability of the content and its related actions.
822823
</ListItem>
823824
<ListItem>
824-
For <Anchor href="https://docs.google.com/document/d/1sYcP_i_YTwYWWdjKDQfkIdMj1NqyZV5c_8k4BxrEYc0/edit?pli=1&tab=t.0#heading=h.yi4naptd6s8d">Multi-step Forms</Anchor> and <Anchor href="/page-templates/wizard">Wizards</Anchor>, keep the primary button right-aligned, placed after secondary buttons to indicate the direction of the form. Refer to our <Anchor href="/page-templates/wizard#actions-footer">Wizards action footer</Anchor> guidelines for additional guidance.
825+
For <Anchor href="#multi-step-forms">Multi-step Forms</Anchor> and <Anchor href="/page-templates/wizard">Wizards</Anchor>, keep the primary button right-aligned, placed after secondary buttons to indicate the direction of the form. Refer to our <Anchor href="/page-templates/wizard#actions-footer">Wizards action footer</Anchor> guidelines for additional guidance.
825826
</ListItem>
826827
</UnorderedList>
827828

0 commit comments

Comments
 (0)