@adobe/spectrum-design-data 3.3.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion.json +32 -102
- package/components/action-bar.json +9 -23
- package/components/action-button.json +52 -92
- package/components/action-group.json +18 -129
- package/components/alert-banner.json +8 -27
- package/components/alert-dialog.json +45 -55
- package/components/avatar-group.json +20 -50
- package/components/avatar.json +44 -123
- package/components/badge.json +66 -160
- package/components/breadcrumbs.json +26 -100
- package/components/button-group.json +32 -63
- package/components/button.json +74 -105
- package/components/calendar.json +8 -67
- package/components/cards.json +31 -46
- package/components/checkbox-group.json +22 -84
- package/components/checkbox.json +33 -96
- package/components/close-button.json +31 -73
- package/components/coach-indicator.json +14 -44
- package/components/coach-mark.json +8 -26
- package/components/color-area.json +20 -93
- package/components/color-handle.json +25 -38
- package/components/color-loupe.json +18 -18
- package/components/color-slider.json +26 -122
- package/components/color-wheel.json +17 -84
- package/components/combo-box.json +56 -188
- package/components/contextual-help.json +87 -126
- package/components/date-picker.json +24 -120
- package/components/divider.json +25 -38
- package/components/drop-zone.json +25 -37
- package/components/field-label.json +22 -59
- package/components/help-text.json +16 -53
- package/components/illustrated-message.json +21 -72
- package/components/in-line-alert.json +13 -53
- package/components/link.json +31 -63
- package/components/list-view.json +15 -73
- package/components/menu.json +51 -180
- package/components/meter.json +35 -76
- package/components/number-field.json +34 -168
- package/components/picker.json +48 -187
- package/components/popover.json +47 -123
- package/components/progress-bar.json +33 -105
- package/components/progress-circle.json +25 -55
- package/components/radio-button.json +14 -67
- package/components/radio-group.json +34 -131
- package/components/rating.json +9 -38
- package/components/search-field.json +40 -125
- package/components/segmented-control.json +27 -69
- package/components/select-box.json +29 -96
- package/components/side-navigation.json +28 -69
- package/components/slider.json +45 -154
- package/components/standard-dialog.json +16 -88
- package/components/status-light.json +51 -133
- package/components/steplist.json +5 -24
- package/components/swatch-group.json +19 -55
- package/components/swatch.json +24 -79
- package/components/switch.json +42 -79
- package/components/table.json +26 -73
- package/components/tabs.json +35 -52
- package/components/tag-field.json +14 -60
- package/components/tag-group.json +22 -55
- package/components/tag.json +27 -77
- package/components/takeover-dialog.json +10 -61
- package/components/text-area.json +55 -204
- package/components/text-field.json +48 -169
- package/components/thumbnail.json +22 -63
- package/components/toast.json +30 -47
- package/components/tooltip.json +37 -84
- package/components/tree-view.json +51 -146
- package/fields/structure.json +1 -2
- package/guidelines/ai-resource-guide.json +42 -0
- package/guidelines/app-frame-overview.json +45 -44
- package/guidelines/applying-the-type-system.json +71 -0
- package/guidelines/attention-hierarchy.json +13 -22
- package/guidelines/background-layers.json +84 -10
- package/guidelines/bi-directionality.json +57 -0
- package/guidelines/border-width.json +70 -0
- package/guidelines/brand.json +24 -12
- package/guidelines/cognitive.json +229 -0
- package/guidelines/colors.json +55 -17
- package/guidelines/component-spacing.json +65 -0
- package/guidelines/contact-us.json +27 -0
- package/guidelines/containers.json +21 -28
- package/guidelines/content-area-browsing-context.json +73 -0
- package/guidelines/creating-bluelines-browsing-context.json +71 -0
- package/guidelines/design-tokens.json +186 -0
- package/guidelines/developer-overview.json +33 -9
- package/guidelines/drop-shadow.json +76 -0
- package/guidelines/faqs.json +100 -9
- package/guidelines/fonts.json +33 -14
- package/guidelines/grammar-and-mechanics.json +276 -0
- package/guidelines/grays.json +17 -44
- package/guidelines/header-browsing-context.json +40 -0
- package/guidelines/icon-fundamentals.json +7 -18
- package/guidelines/illustration.json +120 -0
- package/guidelines/in-product-word-list.json +25 -0
- package/guidelines/inclusive-design.json +101 -0
- package/guidelines/inclusive-ux-writing.json +34 -0
- package/guidelines/internationalization.json +103 -0
- package/guidelines/layout-spacing.json +39 -0
- package/guidelines/manifest.json +280 -16
- package/guidelines/motion.json +18 -13
- package/guidelines/object-styles-overview.json +17 -0
- package/guidelines/principles.json +7 -8
- package/guidelines/resources.json +29 -15
- package/guidelines/rounding.json +85 -0
- package/guidelines/side-navigation-browsing-context.json +74 -0
- package/guidelines/spacing-overview.json +78 -0
- package/guidelines/states.json +16 -11
- package/guidelines/support.json +125 -0
- package/guidelines/typography-overview.json +39 -0
- package/guidelines/typography-system.json +212 -0
- package/guidelines/using-icons.json +32 -47
- package/guidelines/voice-and-tone.json +51 -0
- package/guidelines/whats-new.json +21 -0
- package/guidelines/writing-about-people.json +99 -0
- package/guidelines/writing-for-errors.json +140 -0
- package/guidelines/writing-for-onboarding.json +123 -0
- package/guidelines/writing-for-readability.json +66 -0
- package/guidelines/writing-with-visuals.json +78 -0
- package/llms.txt +27 -0
- package/package.json +3 -2
- package/tokens/layout.tokens.json +88 -0
|
@@ -9,19 +9,6 @@
|
|
|
9
9
|
"category": "status",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/progress-bar/"
|
|
11
11
|
},
|
|
12
|
-
"implementations": [
|
|
13
|
-
{
|
|
14
|
-
"platform": "web",
|
|
15
|
-
"componentName": "ProgressBar",
|
|
16
|
-
"package": "@react-spectrum/s2"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"platform": "web",
|
|
20
|
-
"componentName": "ProgressBar",
|
|
21
|
-
"importPath": "@adobe/spectrum-wc/components/progress-bar",
|
|
22
|
-
"notes": "Spectrum 2 web component custom element: swc-progress-bar."
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
12
|
"documentBlocks": [
|
|
26
13
|
{
|
|
27
14
|
"type": "purpose",
|
|
@@ -29,102 +16,68 @@
|
|
|
29
16
|
},
|
|
30
17
|
{
|
|
31
18
|
"type": "guideline",
|
|
32
|
-
"content": "
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"type": "guideline",
|
|
36
|
-
"content": "Progress bars come in four different sizes: small, medium, large, and extra-large. The medium size is the default and most frequently used option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page."
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"type": "guideline",
|
|
40
|
-
"content": "Progress bars can have a value label that gives detailed information about the progress (e.g. \"60%\" or \"2 of 8\"). This value label works alongside the label and should not be displayed if the label itself is not displayed. It should also not be displayed if the progress is indeterminate. Similar to the label, the value label is always placed above the track."
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"type": "guideline",
|
|
44
|
-
"content": "The value represents progress within the bar’s range, from minimum to maximum. These defaults are 0 and 100 but can be customized. Min and max values don’t apply to indeterminate progress bars."
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"type": "guideline",
|
|
48
|
-
"content": "The label of the progress bar can be hidden if the context for the progress bar is sufficient without the title — for example, when the progress bar is shown inside a table row and the item is labeled in another column."
|
|
19
|
+
"content": "Minimum and maximum width.\n\nThe minimum width of a progress bar is 48 px and the maximum width of a progress bar is 768 px, for both desktop and mobile platform scale. Smaller progress bars should only be used in places where it's not necessary to have a label."
|
|
49
20
|
},
|
|
50
21
|
{
|
|
51
22
|
"type": "guideline",
|
|
52
|
-
"content": "
|
|
23
|
+
"content": "Text overflow.\n\nWhen the label is too long for the available horizontal space, it wraps to form another line. The value is always shown in full and never wraps or truncates."
|
|
53
24
|
},
|
|
54
25
|
{
|
|
55
26
|
"type": "guideline",
|
|
56
|
-
"content": "Progress
|
|
27
|
+
"content": "Progress bar or progress circle?\n\nBoth progress bars and circles can show either determinate or indeterminate progress. The available space should help determine whether a progress bar or circle is best. Progress bars are preferred in vertically narrow areas such as tables or cards. Use a progress circle for full-page loading or very small areas. Use a progress bar in a loader dialog."
|
|
57
28
|
},
|
|
58
29
|
{
|
|
59
30
|
"type": "guideline",
|
|
60
|
-
"content": "
|
|
31
|
+
"content": "Labels.\n\nUse the built-in style to show a label associated with the operation. This style always includes a left-aligned label and a right-aligned percentage value above the track. The label should be in sentence case. Add an ellipsis (\"...\") at the end to indicate that the action is in progress — for example, \"Loading data...\" or \"Updating settings..."
|
|
61
32
|
},
|
|
62
33
|
{
|
|
63
34
|
"type": "guideline",
|
|
64
|
-
"content": "
|
|
35
|
+
"content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the progress bar is mirrored for both determinate and indeterminate options. The label is right-aligned, the value is left-aligned, and the fill progresses from right to left. Keep in mind that the placement of the percent sign differs depending on the locale."
|
|
65
36
|
},
|
|
66
37
|
{
|
|
67
38
|
"type": "guideline",
|
|
68
|
-
"content": "
|
|
39
|
+
"content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus onto or off of the button. Space or Enter Executes the button action. The focus remains on the button except if the button opens or closes the current container. In this case, the focus moves to the target or back to the caller."
|
|
69
40
|
},
|
|
70
41
|
{
|
|
71
42
|
"type": "guideline",
|
|
72
|
-
"content": "
|
|
43
|
+
"content": "Cursor guidelines.\n\nCursor Usage Pointer Use the pointer cursor for all interactive components."
|
|
73
44
|
},
|
|
74
45
|
{
|
|
75
46
|
"type": "guideline",
|
|
76
|
-
"content": "
|
|
77
|
-
}
|
|
47
|
+
"content": "WCAG 2.2 compliance.\n\nAny criterion not mention in the below table are not applicable to this component or are resolved with underlying requirements, engineering, and styles of the entire system. 1. Perceivable Requirement Criterion Level Compliance Non-text content 1.1.1 A Non‑text elements—such as icons used in buttons—must provide a text alternative that communicates the button’s purpose. All buttons, especially icon‑only buttons, need an accessible name (for example, via a title, aria‑label, or associated text) so screen readers can announce their function. Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAA Buttons should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role of buttons should be utilized. Use of color 1.4.1 A Color is never used as the sole way to convey meaning in buttons. While negative buttons do use red to reinforce their purpose, every button also includes a clear text label that communicates the action it performs. Text contrast minimums 1.4.3 AA Large text has a contrast ratio of at least 3:1, and small text has a contrast ratio of at least 4.5:1. Incidental text such as disabled, hidden, or decorative text has no contrast requirement. Resize text 1.4.4 AA Buttons should be built in such a way that they can be resized without assistive technology up to 200%. Visual presentation 1.4.8 AAA The width of text blocks is no more than 80 characters (40 for CJK languages), and text is never justified. Non-text contrast 1.4.11 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line height of text is at least 1.5x the font size. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus can be moved away from the component using only a keyboard. Seizures and physical reactions 2.3.1, 2.3.2, 2.3.3 A, AAA, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"implementations": [
|
|
78
51
|
{
|
|
79
|
-
"
|
|
80
|
-
"
|
|
52
|
+
"platform": "web",
|
|
53
|
+
"componentName": "ProgressBar",
|
|
54
|
+
"package": "@react-spectrum/s2"
|
|
81
55
|
},
|
|
82
56
|
{
|
|
83
|
-
"
|
|
84
|
-
"
|
|
57
|
+
"platform": "web",
|
|
58
|
+
"componentName": "ProgressBar",
|
|
59
|
+
"importPath": "@adobe/spectrum-wc/components/progress-bar",
|
|
60
|
+
"notes": "Spectrum 2 web component custom element: swc-progress-bar."
|
|
85
61
|
}
|
|
86
62
|
],
|
|
87
63
|
"options": {
|
|
88
64
|
"variant": {
|
|
89
65
|
"type": "string",
|
|
90
66
|
"default": "default",
|
|
91
|
-
"values": [
|
|
92
|
-
{
|
|
93
|
-
"value": "default"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"value": "over background"
|
|
97
|
-
}
|
|
98
|
-
]
|
|
67
|
+
"values": [{ "value": "default" }, { "value": "over background" }]
|
|
99
68
|
},
|
|
100
69
|
"staticColor": {
|
|
101
70
|
"type": "string",
|
|
102
71
|
"description": "Static color can only be white, otherwise it is default.",
|
|
103
|
-
"values": [
|
|
104
|
-
{
|
|
105
|
-
"value": "white"
|
|
106
|
-
}
|
|
107
|
-
]
|
|
108
|
-
},
|
|
109
|
-
"label": {
|
|
110
|
-
"type": "string"
|
|
72
|
+
"values": [{ "value": "white" }]
|
|
111
73
|
},
|
|
74
|
+
"label": { "type": "string" },
|
|
112
75
|
"labelPosition": {
|
|
113
76
|
"type": "string",
|
|
114
77
|
"default": "top",
|
|
115
|
-
"values": [
|
|
116
|
-
{
|
|
117
|
-
"value": "top"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"value": "side"
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
"hideLabel": {
|
|
125
|
-
"type": "boolean",
|
|
126
|
-
"default": false
|
|
78
|
+
"values": [{ "value": "top" }, { "value": "side" }]
|
|
127
79
|
},
|
|
80
|
+
"hideLabel": { "type": "boolean", "default": false },
|
|
128
81
|
"value": {
|
|
129
82
|
"type": "number",
|
|
130
83
|
"description": "Not applicable when indeterminate."
|
|
@@ -139,52 +92,27 @@
|
|
|
139
92
|
"default": 1,
|
|
140
93
|
"description": "Not applicable when indeterminate."
|
|
141
94
|
},
|
|
142
|
-
"valueLabel": {
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
"width": {
|
|
146
|
-
"type": "number"
|
|
147
|
-
},
|
|
95
|
+
"valueLabel": { "type": "string" },
|
|
96
|
+
"width": { "type": "number" },
|
|
148
97
|
"size": {
|
|
149
98
|
"type": "string",
|
|
150
99
|
"default": "m",
|
|
151
100
|
"values": [
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"value": "m"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"value": "l"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"value": "xl"
|
|
163
|
-
}
|
|
101
|
+
{ "value": "s" },
|
|
102
|
+
{ "value": "m" },
|
|
103
|
+
{ "value": "l" },
|
|
104
|
+
{ "value": "xl" }
|
|
164
105
|
]
|
|
165
106
|
},
|
|
166
|
-
"isIndeterminate": {
|
|
167
|
-
"type": "boolean",
|
|
168
|
-
"default": false
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
"lifecycle": {
|
|
172
|
-
"introduced": "1.0.0-draft"
|
|
107
|
+
"isIndeterminate": { "type": "boolean", "default": false }
|
|
173
108
|
},
|
|
109
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
174
110
|
"accessibility": {
|
|
175
111
|
"role": "progressbar",
|
|
176
112
|
"focusable": false,
|
|
177
113
|
"wcag": [
|
|
178
|
-
{
|
|
179
|
-
|
|
180
|
-
"level": "A",
|
|
181
|
-
"title": "Name, Role, Value"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"criterion": "4.1.3",
|
|
185
|
-
"level": "AA",
|
|
186
|
-
"title": "Status Messages"
|
|
187
|
-
}
|
|
114
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" },
|
|
115
|
+
{ "criterion": "4.1.3", "level": "AA", "title": "Status Messages" }
|
|
188
116
|
]
|
|
189
117
|
}
|
|
190
118
|
}
|
|
@@ -9,19 +9,6 @@
|
|
|
9
9
|
"category": "status",
|
|
10
10
|
"documentationUrl": "https://spectrum.adobe.com/page/progress-circle/"
|
|
11
11
|
},
|
|
12
|
-
"implementations": [
|
|
13
|
-
{
|
|
14
|
-
"platform": "web",
|
|
15
|
-
"componentName": "ProgressCircle",
|
|
16
|
-
"package": "@react-spectrum/s2"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"platform": "web",
|
|
20
|
-
"componentName": "ProgressCircle",
|
|
21
|
-
"importPath": "@adobe/spectrum-wc/components/progress-circle",
|
|
22
|
-
"notes": "Spectrum 2 web component custom element: swc-progress-circle."
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
12
|
"documentBlocks": [
|
|
26
13
|
{
|
|
27
14
|
"type": "purpose",
|
|
@@ -29,41 +16,47 @@
|
|
|
29
16
|
},
|
|
30
17
|
{
|
|
31
18
|
"type": "guideline",
|
|
32
|
-
"content": "
|
|
19
|
+
"content": "Use progress circles for loading views.\n\nMedium and large progress circles are optimized for large areas with no space constraints. Use them for loading content into views (e.g., web pages, panels, etc.)"
|
|
33
20
|
},
|
|
34
21
|
{
|
|
35
22
|
"type": "guideline",
|
|
36
|
-
"content": "
|
|
23
|
+
"content": "Use small progress circle when space is limited.\n\nSmall progress circles are well suited when space is limited both vertically and horizontally, such as in buttons, menu items, and input fields."
|
|
37
24
|
},
|
|
38
25
|
{
|
|
39
26
|
"type": "guideline",
|
|
40
|
-
"content": "
|
|
27
|
+
"content": "RTL.\n\nFor RTL (right-to-left) languages, the fill of both the determinate and indeterminate progress circle continues to spin clockwise."
|
|
41
28
|
},
|
|
42
29
|
{
|
|
43
30
|
"type": "guideline",
|
|
44
|
-
"content": "
|
|
31
|
+
"content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus onto or off of the button. Space or Enter Executes the button action. The focus remains on the button except if the button opens or closes the current container. In this case, the focus moves to the target or back to the caller."
|
|
45
32
|
},
|
|
46
33
|
{
|
|
47
34
|
"type": "guideline",
|
|
48
|
-
"content": "
|
|
35
|
+
"content": "Cursor guidelines.\n\nCursor Usage Pointer Use the pointer cursor for all interactive components."
|
|
49
36
|
},
|
|
50
37
|
{
|
|
51
38
|
"type": "guideline",
|
|
52
|
-
"content": "
|
|
39
|
+
"content": "WCAG 2.2 compliance.\n\nAny criterion not mention in the below table are not applicable to this component or are resolved with underlying requirements, engineering, and styles of the entire system. 1. Perceivable Requirement Criterion Level Compliance Non-text content 1.1.1 A Non‑text elements—such as icons used in buttons—must provide a text alternative that communicates the button’s purpose. All buttons, especially icon‑only buttons, need an accessible name (for example, via a title, aria‑label, or associated text) so screen readers can announce their function. Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAA Buttons should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role of buttons should be utilized. Use of color 1.4.1 A Color is never used as the sole way to convey meaning in buttons. While negative buttons do use red to reinforce their purpose, every button also includes a clear text label that communicates the action it performs. Text contrast minimums 1.4.3 AA Large text has a contrast ratio of at least 3:1, and small text has a contrast ratio of at least 4.5:1. Incidental text such as disabled, hidden, or decorative text has no contrast requirement. Resize text 1.4.4 AA Buttons should be built in such a way that they can be resized without assistive technology up to 200%. Visual presentation 1.4.8 AAA The width of text blocks is no more than 80 characters (40 for CJK languages), and text is never justified. Non-text contrast 1.4.11 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line height of text is at least 1.5x the font size. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus can be moved away from the component using only a keyboard. Seizures and physical reactions 2.3.1, 2.3.2, 2.3.3 A, AAA, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"implementations": [
|
|
43
|
+
{
|
|
44
|
+
"platform": "web",
|
|
45
|
+
"componentName": "ProgressCircle",
|
|
46
|
+
"package": "@react-spectrum/s2"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"platform": "web",
|
|
50
|
+
"componentName": "ProgressCircle",
|
|
51
|
+
"importPath": "@adobe/spectrum-wc/components/progress-circle",
|
|
52
|
+
"notes": "Spectrum 2 web component custom element: swc-progress-circle."
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
55
|
"options": {
|
|
56
56
|
"variant": {
|
|
57
57
|
"type": "string",
|
|
58
58
|
"default": "default",
|
|
59
|
-
"values": [
|
|
60
|
-
{
|
|
61
|
-
"value": "default"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"value": "over background"
|
|
65
|
-
}
|
|
66
|
-
]
|
|
59
|
+
"values": [{ "value": "default" }, { "value": "over background" }]
|
|
67
60
|
},
|
|
68
61
|
"value": {
|
|
69
62
|
"type": "number",
|
|
@@ -82,40 +75,17 @@
|
|
|
82
75
|
"size": {
|
|
83
76
|
"type": "string",
|
|
84
77
|
"default": "m",
|
|
85
|
-
"values": [
|
|
86
|
-
{
|
|
87
|
-
"value": "s"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"value": "m"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"value": "l"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
78
|
+
"values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
|
|
96
79
|
},
|
|
97
|
-
"isIndeterminate": {
|
|
98
|
-
"type": "boolean",
|
|
99
|
-
"default": false
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"lifecycle": {
|
|
103
|
-
"introduced": "1.0.0-draft"
|
|
80
|
+
"isIndeterminate": { "type": "boolean", "default": false }
|
|
104
81
|
},
|
|
82
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
105
83
|
"accessibility": {
|
|
106
84
|
"role": "progressbar",
|
|
107
85
|
"focusable": false,
|
|
108
86
|
"wcag": [
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
"level": "A",
|
|
112
|
-
"title": "Name, Role, Value"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"criterion": "4.1.3",
|
|
116
|
-
"level": "AA",
|
|
117
|
-
"title": "Status Messages"
|
|
118
|
-
}
|
|
87
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" },
|
|
88
|
+
{ "criterion": "4.1.3", "level": "AA", "title": "Status Messages" }
|
|
119
89
|
]
|
|
120
90
|
}
|
|
121
91
|
}
|
|
@@ -16,80 +16,39 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Keyboard focus.\n\nA radio button can be navigated using a keyboard. The keyboard focus state takes the radio button's visual hover state and adds a blue ring to the radio button in focus."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Text overflow.\n\nWhen the button text is too long for the horizontal space available, it wraps to form another line."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Radio button, checkbox or switch?\n\nRadio buttons are best when only one option can be selected at a time from a set (for example choosing one preference or mode). Switches are best for communicating activation (e.g., turning a setting on or off). Checkboxes are best for communicating selection (e.g., selecting multiple items from a list)."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "When to use an emphasized radio button?\n\nEmphasized radio buttons are optimal for forms, settings, and other scenarios where the radio buttons need to be noticed. Default radio buttons are optimal for application panels where all the visual components are monochrome in order to direct focus to the canvas."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"type": "guideline",
|
|
39
|
-
"content": "Radio buttons come in four different sizes: small, medium, large, and extra-large. The medium size is the default and most frequently used option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page."
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "guideline",
|
|
43
|
-
"content": "A radio button can be navigated using a keyboard. The keyboard focus state takes the radio button’s visual hover state and adds a blue ring to the radio button in focus."
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"type": "guideline",
|
|
47
|
-
"content": "When the button text is too long for the horizontal space available, it wraps to form another line."
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "guideline",
|
|
51
|
-
"content": "Radio buttons are best when only one option can be selected at a time from a set (for example choosing one preference or mode). Switches are best for communicating activation (e.g., turning a setting on or off). Checkboxes are best for communicating selection (e.g., selecting multiple items from a list)."
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"type": "guideline",
|
|
55
|
-
"content": "Emphasized radio buttons are optimal for forms, settings, and other scenarios where the radio buttons need to be noticed. Default radio buttons are optimal for application panels where all the visual components are monochrome in order to direct focus to the canvas."
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "guideline",
|
|
59
|
-
"content": "Radio buttons can only be on or off. Indeterminate radio buttons don’t exist in accessibility APIs, so it’s not possible to make an indeterminate radio button accessible. If you need to show a partial state, use a checkbox instead of a radio button. When a parent radio button represents a group of radio buttons, it should be turned off unless all of the radio buttons are on (turning the parent radio button on turns all of the radio buttons on)."
|
|
35
|
+
"content": "No partial state.\n\nRadio buttons can only be on or off. Indeterminate radio buttons don't exist in accessibility APIs, so it's not possible to make an indeterminate radio button accessible. If you need to show a partial state, use a checkbox instead of a radio button. When a parent radio button represents a group of radio buttons, it should be turned off unless all of the radio buttons are on (turning the parent radio button on turns all of the radio buttons on)."
|
|
60
36
|
}
|
|
61
37
|
],
|
|
62
38
|
"options": {
|
|
63
|
-
"isSelected": {
|
|
64
|
-
|
|
65
|
-
"default": false
|
|
66
|
-
},
|
|
67
|
-
"isEmphasized": {
|
|
68
|
-
"type": "boolean",
|
|
69
|
-
"default": false
|
|
70
|
-
},
|
|
39
|
+
"isSelected": { "type": "boolean", "default": false },
|
|
40
|
+
"isEmphasized": { "type": "boolean", "default": false },
|
|
71
41
|
"label": {
|
|
72
42
|
"type": "string",
|
|
73
43
|
"description": "The text displayed next to a radio button."
|
|
74
44
|
}
|
|
75
45
|
},
|
|
76
46
|
"states": [
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"name": "down",
|
|
83
|
-
"trigger": "interaction"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"name": "keyboard-focus",
|
|
87
|
-
"trigger": "interaction"
|
|
88
|
-
}
|
|
47
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
48
|
+
{ "name": "down", "trigger": "interaction" },
|
|
49
|
+
{ "name": "keyboard-focus", "trigger": "interaction" }
|
|
89
50
|
],
|
|
90
|
-
"lifecycle": {
|
|
91
|
-
"introduced": "1.0.0-draft"
|
|
92
|
-
},
|
|
51
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
93
52
|
"tokenBindings": [
|
|
94
53
|
{
|
|
95
54
|
"token": "neutral-content-color-selected-default",
|
|
@@ -110,21 +69,9 @@
|
|
|
110
69
|
"focusable": true,
|
|
111
70
|
"keyboardIntents": ["activate"],
|
|
112
71
|
"wcag": [
|
|
113
|
-
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"title": "Info and Relationships"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"criterion": "2.1.1",
|
|
120
|
-
"level": "A",
|
|
121
|
-
"title": "Keyboard"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"criterion": "4.1.2",
|
|
125
|
-
"level": "A",
|
|
126
|
-
"title": "Name, Role, Value"
|
|
127
|
-
}
|
|
72
|
+
{ "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
|
|
73
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
74
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
128
75
|
]
|
|
129
76
|
}
|
|
130
77
|
}
|