@adobe/spectrum-design-data 3.3.0-beta.2 → 3.3.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 +67 -15
- package/components/action-bar.json +30 -9
- package/components/action-button.json +92 -39
- package/components/action-group.json +137 -18
- package/components/alert-banner.json +27 -8
- package/components/alert-dialog.json +55 -34
- package/components/avatar-group.json +35 -9
- package/components/avatar.json +105 -29
- package/components/badge.json +163 -56
- package/components/breadcrumbs.json +107 -26
- package/components/button-group.json +63 -19
- package/components/button.json +105 -61
- package/components/calendar.json +74 -8
- package/components/card.json +13 -0
- package/components/cards.json +46 -31
- package/components/checkbox-group.json +85 -16
- package/components/checkbox.json +97 -27
- package/components/close-button.json +75 -20
- package/components/coach-indicator.json +44 -14
- package/components/coach-mark.json +26 -8
- package/components/color-area.json +100 -20
- package/components/color-handle.json +46 -25
- package/components/color-loupe.json +14 -2
- package/components/color-slider.json +129 -26
- package/components/color-wheel.json +91 -17
- package/components/combo-box.json +189 -50
- package/components/contextual-help.json +126 -80
- package/components/date-field.json +7 -0
- package/components/date-picker.json +127 -24
- package/components/divider.json +38 -12
- package/components/drop-zone.json +37 -18
- package/components/field-label.json +62 -21
- package/components/heading.json +7 -0
- package/components/help-text.json +53 -16
- package/components/illustrated-message.json +85 -21
- package/components/in-line-alert.json +53 -13
- package/components/link.json +63 -24
- package/components/list-view.json +80 -15
- package/components/menu.json +181 -45
- package/components/meter.json +78 -24
- package/components/number-field.json +175 -34
- package/components/picker.json +188 -42
- package/components/popover.json +126 -37
- package/components/progress-bar.json +108 -23
- package/components/progress-circle.json +55 -12
- package/components/radio-button.json +67 -14
- package/components/radio-group.json +132 -28
- package/components/rating.json +38 -9
- package/components/search-field.json +126 -34
- package/components/segmented-control.json +70 -21
- package/components/select-box.json +103 -29
- package/components/side-navigation.json +69 -28
- package/components/slider.json +155 -39
- package/components/standard-dialog.json +88 -16
- package/components/status-light.json +136 -41
- package/components/steplist.json +24 -5
- package/components/swatch-group.json +55 -19
- package/components/swatch.json +79 -24
- package/components/switch.json +79 -31
- package/components/table.json +73 -26
- package/components/tabs.json +52 -22
- package/components/tag-field.json +60 -14
- package/components/tag-group.json +56 -16
- package/components/tag.json +78 -21
- package/components/takeover-dialog.json +61 -10
- package/components/text-area.json +205 -49
- package/components/text-field.json +170 -42
- package/components/thumbnail.json +63 -22
- package/components/time-field.json +7 -0
- package/components/toast.json +50 -29
- package/components/tooltip.json +87 -27
- package/components/tree-view.json +147 -45
- package/components/user-card.json +7 -0
- package/guidelines/app-frame-overview.json +44 -46
- package/guidelines/attention-hierarchy.json +22 -13
- package/guidelines/background-layers.json +10 -80
- package/guidelines/brand.json +12 -32
- package/guidelines/colors.json +17 -47
- package/guidelines/developer-overview.json +9 -25
- package/guidelines/faqs.json +9 -96
- package/guidelines/fonts.json +14 -29
- package/guidelines/grays.json +44 -17
- package/guidelines/icon-fundamentals.json +18 -7
- package/guidelines/manifest.json +15 -367
- package/guidelines/motion.json +16 -17
- package/guidelines/principles.json +8 -7
- package/guidelines/resources.json +15 -21
- package/guidelines/states.json +11 -16
- package/guidelines/using-icons.json +44 -33
- package/package.json +2 -2
- package/registry/platform-implementations.json +30 -0
- package/guidelines/ai-resource-guide.json +0 -50
- package/guidelines/applying-the-type-system.json +0 -67
- package/guidelines/bi-directionality.json +0 -57
- package/guidelines/border-width.json +0 -58
- package/guidelines/cognitive.json +0 -197
- package/guidelines/component-spacing.json +0 -61
- package/guidelines/contact-us.json +0 -67
- package/guidelines/content-area-browsing-context.json +0 -65
- package/guidelines/content-design-grammar-and-mechanics.json +0 -241
- package/guidelines/content-design-voice-and-tone.json +0 -37
- package/guidelines/content-grammar-and-mechanics.json +0 -252
- package/guidelines/content-language-and-inclusivity-writing-about-people.json +0 -103
- package/guidelines/content-language-and-inclusivity-writing-with-visuals.json +0 -70
- package/guidelines/content-voice-and-tone.json +0 -47
- package/guidelines/creating-bluelines-browsing-context.json +0 -91
- package/guidelines/design-tokens.json +0 -158
- package/guidelines/drop-shadow.json +0 -68
- package/guidelines/grammar-and-mechanics.json +0 -252
- package/guidelines/header-browsing-context.json +0 -40
- package/guidelines/illustration.json +0 -105
- package/guidelines/in-product-word-list.json +0 -29
- package/guidelines/inclusive-design.json +0 -101
- package/guidelines/inclusive-ux-writing.json +0 -30
- package/guidelines/internationalization.json +0 -87
- package/guidelines/language-and-inclusivity-writing-about-people.json +0 -85
- package/guidelines/language-and-inclusivity-writing-with-visuals.json +0 -61
- package/guidelines/layout-and-structure-containers.json +0 -47
- package/guidelines/layout-and-structure-spacing-overview.json +0 -66
- package/guidelines/layout-spacing.json +0 -39
- package/guidelines/object-styles-overview.json +0 -17
- package/guidelines/rounding.json +0 -73
- package/guidelines/side-navigation-browsing-context.json +0 -74
- package/guidelines/spacing-overview.json +0 -45
- package/guidelines/support.json +0 -113
- package/guidelines/typography-overview.json +0 -43
- package/guidelines/typography-system.json +0 -208
- package/guidelines/visual-language-containers.json +0 -36
- package/guidelines/voice-and-tone.json +0 -47
- package/guidelines/whats-new.json +0 -32
- package/guidelines/writing-about-people.json +0 -103
- package/guidelines/writing-for-errors.json +0 -120
- package/guidelines/writing-for-onboarding.json +0 -119
- package/guidelines/writing-for-readability.json +0 -54
- package/guidelines/writing-with-visuals.json +0 -70
- package/registry/platform-extensions/web-components-states.json +0 -58
|
@@ -9,6 +9,19 @@
|
|
|
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
|
+
],
|
|
12
25
|
"documentBlocks": [
|
|
13
26
|
{
|
|
14
27
|
"type": "purpose",
|
|
@@ -16,55 +29,102 @@
|
|
|
16
29
|
},
|
|
17
30
|
{
|
|
18
31
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
32
|
+
"content": "A progress bar can be either determinate or indeterminate. By default, progress bars are determinate. Use a determinate progress bar when progress can be calculated against a specific goal (e.g., downloading a file of a known size). Use an indeterminate progress bar when progress is happening but the time or effort to completion can’t be determined (e.g., attempting to reconnect to a server)."
|
|
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."
|
|
20
45
|
},
|
|
21
46
|
{
|
|
22
47
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
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."
|
|
24
49
|
},
|
|
25
50
|
{
|
|
26
51
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
52
|
+
"content": "Labels can be placed either on top or on the side. Top labels are the default and are recommended because they work better with long copy, localization, and responsive layouts. Side labels are most useful when vertical space is limited."
|
|
28
53
|
},
|
|
29
54
|
{
|
|
30
55
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
56
|
+
"content": "Progress bars should have a label that gives context about the operation being performed. Use an ellipsis at the end of the label text to communicate that the process is in progress. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the label could be undefined. These progress bars should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”)."
|
|
32
57
|
},
|
|
33
58
|
{
|
|
34
59
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
60
|
+
"content": "When a progress bar needs to be placed on top of a colored background, use the over background variant. This progress bar uses a static white color regardless of the color theme. Make sure the background offers enough contrast for the progress bar to be legible."
|
|
36
61
|
},
|
|
37
62
|
{
|
|
38
63
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
64
|
+
"content": "Use the over background variant when a progress bar needs to be placed on top of a colored background or visual."
|
|
40
65
|
},
|
|
41
66
|
{
|
|
42
67
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
68
|
+
"content": "Over background progress bars are available in static black or white, meaning they don’t change with the theme of the page. Use static black on light color or image backgrounds, and white on dark color or image backgrounds."
|
|
44
69
|
},
|
|
45
70
|
{
|
|
46
71
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
72
|
+
"content": "The 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."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "guideline",
|
|
76
|
+
"content": "When 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."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "guideline",
|
|
80
|
+
"content": "Both 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."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "guideline",
|
|
84
|
+
"content": "Use 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..."
|
|
48
85
|
}
|
|
49
86
|
],
|
|
50
87
|
"options": {
|
|
51
88
|
"variant": {
|
|
52
89
|
"type": "string",
|
|
53
90
|
"default": "default",
|
|
54
|
-
"values": [
|
|
91
|
+
"values": [
|
|
92
|
+
{
|
|
93
|
+
"value": "default"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"value": "over background"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
55
99
|
},
|
|
56
100
|
"staticColor": {
|
|
57
101
|
"type": "string",
|
|
58
102
|
"description": "Static color can only be white, otherwise it is default.",
|
|
59
|
-
"values": [
|
|
103
|
+
"values": [
|
|
104
|
+
{
|
|
105
|
+
"value": "white"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"label": {
|
|
110
|
+
"type": "string"
|
|
60
111
|
},
|
|
61
|
-
"label": { "type": "string" },
|
|
62
112
|
"labelPosition": {
|
|
63
113
|
"type": "string",
|
|
64
114
|
"default": "top",
|
|
65
|
-
"values": [
|
|
115
|
+
"values": [
|
|
116
|
+
{
|
|
117
|
+
"value": "top"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"value": "side"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"hideLabel": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": false
|
|
66
127
|
},
|
|
67
|
-
"hideLabel": { "type": "boolean", "default": false },
|
|
68
128
|
"value": {
|
|
69
129
|
"type": "number",
|
|
70
130
|
"description": "Not applicable when indeterminate."
|
|
@@ -79,27 +139,52 @@
|
|
|
79
139
|
"default": 1,
|
|
80
140
|
"description": "Not applicable when indeterminate."
|
|
81
141
|
},
|
|
82
|
-
"valueLabel": {
|
|
83
|
-
|
|
142
|
+
"valueLabel": {
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
"width": {
|
|
146
|
+
"type": "number"
|
|
147
|
+
},
|
|
84
148
|
"size": {
|
|
85
149
|
"type": "string",
|
|
86
150
|
"default": "m",
|
|
87
151
|
"values": [
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{
|
|
152
|
+
{
|
|
153
|
+
"value": "s"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"value": "m"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"value": "l"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"value": "xl"
|
|
163
|
+
}
|
|
92
164
|
]
|
|
93
165
|
},
|
|
94
|
-
"isIndeterminate": {
|
|
166
|
+
"isIndeterminate": {
|
|
167
|
+
"type": "boolean",
|
|
168
|
+
"default": false
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"lifecycle": {
|
|
172
|
+
"introduced": "1.0.0-draft"
|
|
95
173
|
},
|
|
96
|
-
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
97
174
|
"accessibility": {
|
|
98
175
|
"role": "progressbar",
|
|
99
176
|
"focusable": false,
|
|
100
177
|
"wcag": [
|
|
101
|
-
{
|
|
102
|
-
|
|
178
|
+
{
|
|
179
|
+
"criterion": "4.1.2",
|
|
180
|
+
"level": "A",
|
|
181
|
+
"title": "Name, Role, Value"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"criterion": "4.1.3",
|
|
185
|
+
"level": "AA",
|
|
186
|
+
"title": "Status Messages"
|
|
187
|
+
}
|
|
103
188
|
]
|
|
104
189
|
}
|
|
105
190
|
}
|
|
@@ -9,6 +9,19 @@
|
|
|
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
|
+
],
|
|
12
25
|
"documentBlocks": [
|
|
13
26
|
{
|
|
14
27
|
"type": "purpose",
|
|
@@ -16,34 +29,41 @@
|
|
|
16
29
|
},
|
|
17
30
|
{
|
|
18
31
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
32
|
+
"content": "Progress circles can be determinate or indeterminate. Use determinate when progress can be measured against a goal, such as downloading a file. Use indeterminate when the duration or effort is unknown, like reconnecting to a server."
|
|
20
33
|
},
|
|
21
34
|
{
|
|
22
35
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
36
|
+
"content": "Progress circles come in 3 sizes: small, medium (default), or large. These are available to fit various contexts. For example, the small progress circle can be used in place of an icon or in tight spaces, while the large one can be used for full-page loading."
|
|
24
37
|
},
|
|
25
38
|
{
|
|
26
39
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
40
|
+
"content": "The value represents progress within the circle’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 circles."
|
|
28
41
|
},
|
|
29
42
|
{
|
|
30
43
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
44
|
+
"content": "When a progress circle needs to be placed on top of a colored background, use the over background variant. This progress circle uses a static white color regardless of the color theme. Make sure the background offers enough contrast for the progress circle to be legible."
|
|
32
45
|
},
|
|
33
46
|
{
|
|
34
47
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
48
|
+
"content": "Medium 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.)"
|
|
36
49
|
},
|
|
37
50
|
{
|
|
38
51
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
52
|
+
"content": "Small progress circles are well suited when space is limited both vertically and horizontally, such as in buttons, menu items, and input fields."
|
|
40
53
|
}
|
|
41
54
|
],
|
|
42
55
|
"options": {
|
|
43
56
|
"variant": {
|
|
44
57
|
"type": "string",
|
|
45
58
|
"default": "default",
|
|
46
|
-
"values": [
|
|
59
|
+
"values": [
|
|
60
|
+
{
|
|
61
|
+
"value": "default"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"value": "over background"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
47
67
|
},
|
|
48
68
|
"value": {
|
|
49
69
|
"type": "number",
|
|
@@ -62,17 +82,40 @@
|
|
|
62
82
|
"size": {
|
|
63
83
|
"type": "string",
|
|
64
84
|
"default": "m",
|
|
65
|
-
"values": [
|
|
85
|
+
"values": [
|
|
86
|
+
{
|
|
87
|
+
"value": "s"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"value": "m"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"value": "l"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
66
96
|
},
|
|
67
|
-
"isIndeterminate": {
|
|
97
|
+
"isIndeterminate": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"default": false
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"lifecycle": {
|
|
103
|
+
"introduced": "1.0.0-draft"
|
|
68
104
|
},
|
|
69
|
-
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
70
105
|
"accessibility": {
|
|
71
106
|
"role": "progressbar",
|
|
72
107
|
"focusable": false,
|
|
73
108
|
"wcag": [
|
|
74
|
-
{
|
|
75
|
-
|
|
109
|
+
{
|
|
110
|
+
"criterion": "4.1.2",
|
|
111
|
+
"level": "A",
|
|
112
|
+
"title": "Name, Role, Value"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"criterion": "4.1.3",
|
|
116
|
+
"level": "AA",
|
|
117
|
+
"title": "Status Messages"
|
|
118
|
+
}
|
|
76
119
|
]
|
|
77
120
|
}
|
|
78
121
|
}
|
|
@@ -16,39 +16,80 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Radio buttons present a list of options where only one can be selected at a time. They are styled consistently with other components that support binary selection. Use when all options should be visible and only one can apply."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Radio button should always have a label for accessibility and clear comprehension. When the label is not defined, a radio button becomes standalone. Standalone radio buttons should only be used when their connection to other components is clear and they give sufficient context — for example, in application panels."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "By default, radio buttons are not emphasized. This version is optimal for when the radio button is not the core part of an interface, such as in application panels, where all visual components are monochrome in order to direct focus to the content."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "The emphasized version provides a visual prominence that is optimal for forms, settings, lists or grids of assets, and other situations where a radio button needs to be noticed."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"content": "Radio button can either be selected or not selected. They cannot be in an indeterminate state (unlike checkboxes)."
|
|
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)."
|
|
36
60
|
}
|
|
37
61
|
],
|
|
38
62
|
"options": {
|
|
39
|
-
"isSelected": {
|
|
40
|
-
|
|
63
|
+
"isSelected": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"default": false
|
|
66
|
+
},
|
|
67
|
+
"isEmphasized": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"default": false
|
|
70
|
+
},
|
|
41
71
|
"label": {
|
|
42
72
|
"type": "string",
|
|
43
73
|
"description": "The text displayed next to a radio button."
|
|
44
74
|
}
|
|
45
75
|
},
|
|
46
76
|
"states": [
|
|
47
|
-
{
|
|
48
|
-
|
|
49
|
-
|
|
77
|
+
{
|
|
78
|
+
"name": "hover",
|
|
79
|
+
"trigger": "interaction"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "down",
|
|
83
|
+
"trigger": "interaction"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "keyboard-focus",
|
|
87
|
+
"trigger": "interaction"
|
|
88
|
+
}
|
|
50
89
|
],
|
|
51
|
-
"lifecycle": {
|
|
90
|
+
"lifecycle": {
|
|
91
|
+
"introduced": "1.0.0-draft"
|
|
92
|
+
},
|
|
52
93
|
"tokenBindings": [
|
|
53
94
|
{
|
|
54
95
|
"token": "neutral-content-color-selected-default",
|
|
@@ -69,9 +110,21 @@
|
|
|
69
110
|
"focusable": true,
|
|
70
111
|
"keyboardIntents": ["activate"],
|
|
71
112
|
"wcag": [
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
113
|
+
{
|
|
114
|
+
"criterion": "1.3.1",
|
|
115
|
+
"level": "A",
|
|
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
|
+
}
|
|
75
128
|
]
|
|
76
129
|
}
|
|
77
130
|
}
|