Skip to content

Commit df5a299

Browse files
committed
Cleanup up the guidelines and updating alt text for images
1 parent ff0d198 commit df5a299

File tree

1 file changed

+17
-36
lines changed
  • website/docs/patterns/form-patterns/partials/guidelines

1 file changed

+17
-36
lines changed

website/docs/patterns/form-patterns/partials/guidelines/guidelines.md

+17-36
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,44 @@ Spacing between sections, fields, text, and other form elements should follow a
44

55
### Form
66

7-
A **form** acts as a layout mechanism by wrapping the content, fields and actions to apply consistent spacing while simultaneously handling the logic for submitting information and data collected by the fields.
7+
A **form** acts as a layout mechanism by wrapping the content, fields, and actions to apply consistent spacing while simultaneously handling the logic for submitting information and data collected by the fields.
88

9-
As a layout mechanism, a form consisting of more than one section should use a 32px gap in between sections.
9+
A form can contain more than one section and should use a 32px gap in between each section.
1010

11-
![Form container](/assets/patterns/form-patterns/form-container.png =450x*)
11+
![A form containing multiple sections with a 32px gap in between each one.](/assets/patterns/form-patterns/form-container.png =450x*)
1212

1313
### Sections
1414

15-
A **section** occupies the largest hierarchy within the form. Sections organize text, fields (inputs, checkboxes, toggles, etc.), and actions into logical sets. There should be a 32px vertical gap between each section within the form container.
15+
A **section** occupies the largest hierarchy within a form to organize text, fields, and actions into logical sets.
1616

17-
![Example of multiple sections in a form](/assets/patterns/form-patterns/form-sections.png =450x*)
17+
![Multiple sections stacked vertically in a form.](/assets/patterns/form-patterns/form-sections.png =450x*)
1818

1919
### Fields
2020

21-
A **field** describes a form control and label pairing. When displaying multiple fields within a section, there should be a 24px gap between each field.
21+
A **field** describes a form control and label pairing. When displaying multiple fields within a section, use a 24px gap between each field.
2222

23-
![Example of multiple fields in a section](/assets/patterns/form-patterns/section-fields.png =450x*)
24-
25-
<!-- TODO
26-
Fields can be further divided into two types: **text fields** and **data fields**.
27-
28-
#### Text fields
29-
| Form control | Usage | Examples |
30-
|--------------|-------|----------|
31-
| [Text input](/components/form/text-input) | lorem ipsum | Name, email, password, string and numerical data |
32-
| [Textarea](/components/form/textrea) | Lorem ipsum | Messages, longer-form content |
33-
-->
34-
35-
<!-- TODO
36-
#### Data fields
37-
| Form control | Usage | Examples |
38-
|--------------|-------|----------|
39-
| [Checkbox](/components/form/checkbox) | Lorem ipsum | Lorem ipsum |
40-
| [Radio](/components/form/radio) | Lorem ipsum | Lorem ipsum |
41-
| [Radio Card](/components/form/radio-card) | Lorem ipsum | Lorem ipsum |
42-
| [Select](/components/form/select) | Lorem ipsum | Lorem ipsum |
43-
| [Toggle](/components/form/toggle) | Lorem ipsum | Lorem ipsum |
44-
-->
23+
![Multiple form fields within a section stacked vertically, including an input, radio group, select, and textarea, spaced 24px apart.](/assets/patterns/form-patterns/section-fields.png =450x*)
4524

4625
### Sets
4726

48-
Fields may be organized in a **set** either horizontally or vertically if they are collecting related information or information that is part of the same object. Within a set there should bea 16px gap either horizontally (creating multiple columns), or vertically between each field.
27+
Fields can be organized in a **set** either horizontally or vertically if they are collecting related information or information that is part of the same object. Within a set use a 16px horiztonal or vertical gap between each field.
28+
29+
Within a set use a 16px gap either horizontally (creating multiple columns), or vertically between each field.
4930

50-
![Example of fields organized in a set](/assets/patterns/form-patterns/field-set.png =450x*)
31+
![A set of form fields oriented horizontally with a 16px gap in between them.](/assets/patterns/form-patterns/field-set.png =450x*)
5132

5233
!!! Dont
5334

54-
Don't horizontally organize field types in a set that are related but not of the same type, e.g., a text input and a toggle.
35+
Don't organize filed types that are unrelated in a horizontal set, e.g., a text input and a toggle.
5536

56-
![Organizing different field types](/assets/patterns/form-patterns/different-field-type.png)
37+
![Two fields, a text input and a toggle, organized horizontally.](/assets/patterns/form-patterns/different-field-type.png)
5738
!!!
5839

5940
!!! Do
6041

6142
Do stack fields of different types vertically.
6243

63-
![Organizing different field types](/assets/patterns/form-patterns/different-field-type-do.png =500x*)
44+
![Two fields, a text input and a toggle, organized vertically.](/assets/patterns/form-patterns/different-field-type-do.png =500x*)
6445
!!!
6546

6647
Common sets of fields can include:
@@ -71,15 +52,15 @@ Common sets of fields can include:
7152

7253
#### Alignment
7354

74-
Fields organized in a horizontal set should be aligned to the baseline of each element to account for fields with helper text.
55+
Fields organized in a horizontal set should be aligned to the baseline of the tallest element.
7556

76-
![Baseline alignment within a set](/assets/patterns/form-patterns/baseline-alignment.png =500x*)
57+
![Two form fields organized horizontal, one with a label and helper text, and one with only a label, with the elements aligned to the baseline.](/assets/patterns/form-patterns/baseline-alignment.png =500x*)
7758

7859
### Button sets
7960

8061
Organize buttons based on the [Button Set](/components/button-set) guidelines, e.g., using a 16px horizontal gap between buttons. More specifications and examples can be found in the documentation for [button organization](/patterns/button-organization).
8162

82-
![Button set](/assets/patterns/form-patterns/button-set.png =500x*)
63+
![Two buttons organized horiztonally with a 16px gap in between.](/assets/patterns/form-patterns/button-set.png =500x*)
8364

8465
## Layout
8566

0 commit comments

Comments
 (0)