Skip to content

Commit d47d8c5

Browse files
jawinnpfulton
authored andcommitted
docs(fieldgroup): include aria-invalid on invalid examples
Invalid Field group example was missing the aria-invalid attribute. Also does some general grammar and capitalization cleanup to the docs description and migration guide. CSS-583
1 parent 389c808 commit d47d8c5

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

components/fieldgroup/metadata/fieldgroup.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
name: Field group
22
description: |
33
- A group of fields, usually Radios or Checkboxes.
4-
- Fieldgroup incorporates the help text component which may appear below a fieldgroup.
4+
- Field group incorporates the Help text component which may appear below a Field group.
55
- Help text is necessary to denote invalid checkbox fields, invalid radio button fields, and required fields.
6-
- Invalid radio buttons are signified only by alert help text.
7-
- Invalid checkboxes are signified by alert help text and alert input box color.
6+
- Invalid radio buttons are signified only by negative Help text.
7+
- Invalid checkboxes are signified by negative Help text and the negative/invalid color on the input box.
88
sections:
99
- name: Migration Guide
1010
description: |
11-
### Field Group Now Includes Label and Helptext
11+
### Field group now includes Field label and Help text
1212
- Include Field Label as size medium, `spectrum-FieldLabel spectrum-FieldLabel--sizeM`.
13-
- Include Helptext as `spectrum-HelpText-text`.
14-
### Field Group Label has two layout options
13+
- Include Help text as `spectrum-HelpText-text`.
14+
### Field group label has two layout options
1515
- Label can be top aligned with `spectrum-FieldGroup spectrum-FieldGroup--toplabel`.
1616
- Label can be side aligned with `spectrum-FieldGroup spectrum-FieldGroup--sidelabel`.
17-
### Field Group must now include `spectrum-FieldGroupInputLayout` as the immediate parent of the FieldGroup items
17+
### Field group must now include `spectrum-FieldGroupInputLayout` as the immediate parent of the Field group items
1818
- Due to the addition of label, a new nested div must wrap the fieldgroup items to control their layout separately from the label
1919
2020
examples:
@@ -198,17 +198,22 @@ examples:
198198
<h4 class="spectrum-Heading spectrum-Heading--sizeXS spectrum-Examples-itemHeading">Radio</h4>
199199
200200
<form class="spectrum-Form">
201-
<div class="spectrum-FieldGroup spectrum-FieldGroup--toplabel spectrum-FieldGroup--horizontal" role="radiogroup" aria-labelledby="radiogroup-label-3">
201+
<div
202+
class="spectrum-FieldGroup spectrum-FieldGroup--toplabel spectrum-FieldGroup--horizontal"
203+
role="radiogroup"
204+
aria-invalid="true"
205+
aria-labelledby="radiogroup-label-3"
206+
>
202207
<div class="spectrum-FieldLabel spectrum-FieldLabel--sizeM" id="radiogroup-label-3">Radio Group Label</div>
203208
204209
<div class="spectrum-FieldGroupInputLayout" aria-describedby="helptext-radio-3">
205-
<div class="spectrum-Radio spectrum-FieldGroup-item is-invalid">
210+
<div class="spectrum-Radio spectrum-FieldGroup-item">
206211
<input type="radio" name="pets" class="spectrum-Radio-input" id="radio-4">
207212
<span class="spectrum-Radio-button"></span>
208213
<label class="spectrum-Radio-label" for="radio-0">Kittens</label>
209214
</div>
210215
211-
<div class="spectrum-Radio spectrum-FieldGroup-item is-invalid">
216+
<div class="spectrum-Radio spectrum-FieldGroup-item">
212217
<input type="radio" name="pets" class="spectrum-Radio-input" id="radio-5" checked>
213218
<span class="spectrum-Radio-button"></span>
214219
<label class="spectrum-Radio-label" for="radio-1">Puppies</label>

0 commit comments

Comments
 (0)