@adobe/spectrum-design-data 3.2.3 → 3.3.0-beta.1
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 +15 -54
- package/components/action-bar.json +9 -23
- package/components/action-button.json +39 -79
- package/components/action-group.json +18 -129
- package/components/alert-banner.json +8 -27
- package/components/alert-dialog.json +34 -48
- package/components/avatar-group.json +9 -28
- package/components/avatar.json +29 -92
- package/components/badge.json +56 -150
- package/components/breadcrumbs.json +26 -100
- package/components/button-group.json +19 -50
- package/components/button.json +61 -92
- package/components/calendar.json +8 -67
- package/components/cards.json +31 -46
- package/components/checkbox-group.json +16 -78
- package/components/checkbox.json +27 -90
- package/components/close-button.json +20 -62
- 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 +2 -6
- package/components/color-slider.json +26 -122
- package/components/color-wheel.json +17 -84
- package/components/combo-box.json +50 -182
- package/components/contextual-help.json +80 -119
- package/components/date-picker.json +24 -120
- package/components/divider.json +12 -25
- package/components/drop-zone.json +18 -30
- package/components/field-label.json +21 -62
- 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 +24 -56
- package/components/list-view.json +15 -73
- package/components/menu.json +45 -174
- package/components/meter.json +24 -65
- package/components/number-field.json +34 -168
- package/components/picker.json +42 -181
- package/components/popover.json +37 -113
- package/components/progress-bar.json +23 -95
- package/components/progress-circle.json +12 -42
- package/components/radio-button.json +14 -67
- package/components/radio-group.json +28 -125
- package/components/rating.json +9 -38
- package/components/search-field.json +34 -119
- package/components/segmented-control.json +21 -63
- package/components/select-box.json +29 -96
- package/components/side-navigation.json +28 -69
- package/components/slider.json +39 -148
- package/components/standard-dialog.json +16 -88
- package/components/status-light.json +41 -123
- package/components/steplist.json +5 -24
- package/components/swatch-group.json +19 -55
- package/components/swatch.json +24 -79
- package/components/switch.json +31 -72
- package/components/table.json +26 -73
- package/components/tabs.json +22 -39
- package/components/tag-field.json +14 -60
- package/components/tag-group.json +16 -49
- package/components/tag.json +21 -71
- package/components/takeover-dialog.json +10 -61
- package/components/text-area.json +49 -198
- package/components/text-field.json +42 -163
- package/components/thumbnail.json +22 -63
- package/components/toast.json +29 -50
- package/components/tooltip.json +27 -74
- package/components/tree-view.json +45 -140
- package/guidelines/ai-resource-guide.json +50 -0
- package/guidelines/app-frame-overview.json +44 -50
- package/guidelines/applying-the-type-system.json +63 -0
- package/guidelines/attention-hierarchy.json +12 -21
- package/guidelines/background-layers.json +44 -10
- package/guidelines/bi-directionality.json +57 -0
- package/guidelines/border-width.json +42 -0
- package/guidelines/brand.json +30 -10
- package/guidelines/cognitive.json +197 -0
- package/guidelines/colors.json +35 -17
- package/guidelines/component-spacing.json +49 -0
- package/guidelines/contact-us.json +67 -0
- package/guidelines/content-area-browsing-context.json +65 -0
- package/guidelines/creating-bluelines-browsing-context.json +91 -0
- package/guidelines/design-tokens.json +122 -0
- package/guidelines/developer-overview.json +25 -9
- package/guidelines/drop-shadow.json +56 -0
- package/guidelines/faqs.json +96 -9
- package/guidelines/fonts.json +29 -14
- package/guidelines/grammar-and-mechanics.json +252 -0
- package/guidelines/grays.json +17 -44
- package/guidelines/header-browsing-context.json +37 -0
- package/guidelines/icon-fundamentals.json +7 -18
- package/guidelines/illustration.json +109 -0
- package/guidelines/in-product-word-list.json +29 -0
- package/guidelines/inclusive-design.json +93 -0
- package/guidelines/inclusive-ux-writing.json +30 -0
- package/guidelines/internationalization.json +87 -0
- package/guidelines/introduction.json +2 -2
- package/guidelines/layout-and-structure-containers.json +47 -0
- package/guidelines/layout-spacing.json +39 -0
- package/guidelines/manifest.json +252 -60
- package/guidelines/motion.json +17 -16
- package/guidelines/object-styles-overview.json +17 -0
- package/guidelines/principles.json +2 -2
- package/guidelines/resources.json +21 -15
- package/guidelines/rounding.json +61 -0
- package/guidelines/side-navigation-browsing-context.json +71 -0
- package/guidelines/spacing-overview.json +45 -0
- package/guidelines/states.json +15 -10
- package/guidelines/typography-overview.json +39 -0
- package/guidelines/typography-system.json +168 -0
- package/guidelines/using-icons.json +33 -44
- package/guidelines/visual-language-containers.json +36 -0
- package/guidelines/voice-and-tone.json +47 -0
- package/guidelines/writing-about-people.json +103 -0
- package/guidelines/writing-for-errors.json +120 -0
- package/guidelines/writing-for-onboarding.json +119 -0
- package/guidelines/writing-for-readability.json +54 -0
- package/guidelines/writing-with-visuals.json +70 -0
- package/package.json +1 -1
- package/guidelines/app-frame-content-area.json +0 -81
- package/guidelines/app-frame-creating-bluelines.json +0 -58
- package/guidelines/app-frame-header.json +0 -72
- package/guidelines/app-frame-side-navigation.json +0 -138
- package/guidelines/containers.json +0 -62
- package/guidelines/illustrations.json +0 -111
- package/guidelines/object-styles.json +0 -102
- package/guidelines/spacing.json +0 -25
- package/guidelines/typography-fundamentals.json +0 -142
|
@@ -16,102 +16,55 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
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."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"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."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"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."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"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..."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"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."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
39
|
+
"content": "Keyboard interactions.\n\nKey Interaction TabMoves focus onto or off of the button.Space or EnterExecutes 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."
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
43
|
+
"content": "Cursor guidelines.\n\nCursor Usage PointerUse the pointer cursor for all interactive components."
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "guideline",
|
|
51
|
-
"content": "Use the over background variant when a progress bar needs to be placed on top of a colored background or visual."
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"type": "guideline",
|
|
55
|
-
"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."
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "guideline",
|
|
59
|
-
"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."
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"type": "guideline",
|
|
63
|
-
"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."
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "guideline",
|
|
67
|
-
"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."
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "guideline",
|
|
71
|
-
"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..."
|
|
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 ANon‑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, AAAButtons 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 AColor 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 AALarge 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 AAButtons should be built in such a way that they can be resized without assistive technology up to 200%.Visual presentation 1.4.8 AAAThe 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 AAThe visual presentation of icons and various states have a contrast ratio of at least 3:1.Text spacing 1.4.12 AALine 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, AAAAll functionality of the component is operable through a keyboard without specific timing for keystrokes.Keyboard traps 2.1.2 AFocus 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, AAAThere is no flashing content or unnecessary motion or animation in this component.Focus order 2.4.3 ANavigation sequences receive focus in an order that preserves meaning and operability.Focus visible 2.4.7 AAKeyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
72
48
|
}
|
|
73
49
|
],
|
|
74
50
|
"options": {
|
|
75
51
|
"variant": {
|
|
76
52
|
"type": "string",
|
|
77
53
|
"default": "default",
|
|
78
|
-
"values": [
|
|
79
|
-
{
|
|
80
|
-
"value": "default"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"value": "over background"
|
|
84
|
-
}
|
|
85
|
-
]
|
|
54
|
+
"values": [{ "value": "default" }, { "value": "over background" }]
|
|
86
55
|
},
|
|
87
56
|
"staticColor": {
|
|
88
57
|
"type": "string",
|
|
89
58
|
"description": "Static color can only be white, otherwise it is default.",
|
|
90
|
-
"values": [
|
|
91
|
-
{
|
|
92
|
-
"value": "white"
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
|
-
"label": {
|
|
97
|
-
"type": "string"
|
|
59
|
+
"values": [{ "value": "white" }]
|
|
98
60
|
},
|
|
61
|
+
"label": { "type": "string" },
|
|
99
62
|
"labelPosition": {
|
|
100
63
|
"type": "string",
|
|
101
64
|
"default": "top",
|
|
102
|
-
"values": [
|
|
103
|
-
{
|
|
104
|
-
"value": "top"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"value": "side"
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
"hideLabel": {
|
|
112
|
-
"type": "boolean",
|
|
113
|
-
"default": false
|
|
65
|
+
"values": [{ "value": "top" }, { "value": "side" }]
|
|
114
66
|
},
|
|
67
|
+
"hideLabel": { "type": "boolean", "default": false },
|
|
115
68
|
"value": {
|
|
116
69
|
"type": "number",
|
|
117
70
|
"description": "Not applicable when indeterminate."
|
|
@@ -126,52 +79,27 @@
|
|
|
126
79
|
"default": 1,
|
|
127
80
|
"description": "Not applicable when indeterminate."
|
|
128
81
|
},
|
|
129
|
-
"valueLabel": {
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
"width": {
|
|
133
|
-
"type": "number"
|
|
134
|
-
},
|
|
82
|
+
"valueLabel": { "type": "string" },
|
|
83
|
+
"width": { "type": "number" },
|
|
135
84
|
"size": {
|
|
136
85
|
"type": "string",
|
|
137
86
|
"default": "m",
|
|
138
87
|
"values": [
|
|
139
|
-
{
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"value": "m"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"value": "l"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"value": "xl"
|
|
150
|
-
}
|
|
88
|
+
{ "value": "s" },
|
|
89
|
+
{ "value": "m" },
|
|
90
|
+
{ "value": "l" },
|
|
91
|
+
{ "value": "xl" }
|
|
151
92
|
]
|
|
152
93
|
},
|
|
153
|
-
"isIndeterminate": {
|
|
154
|
-
"type": "boolean",
|
|
155
|
-
"default": false
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
"lifecycle": {
|
|
159
|
-
"introduced": "1.0.0-draft"
|
|
94
|
+
"isIndeterminate": { "type": "boolean", "default": false }
|
|
160
95
|
},
|
|
96
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
161
97
|
"accessibility": {
|
|
162
98
|
"role": "progressbar",
|
|
163
99
|
"focusable": false,
|
|
164
100
|
"wcag": [
|
|
165
|
-
{
|
|
166
|
-
|
|
167
|
-
"level": "A",
|
|
168
|
-
"title": "Name, Role, Value"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"criterion": "4.1.3",
|
|
172
|
-
"level": "AA",
|
|
173
|
-
"title": "Status Messages"
|
|
174
|
-
}
|
|
101
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" },
|
|
102
|
+
{ "criterion": "4.1.3", "level": "AA", "title": "Status Messages" }
|
|
175
103
|
]
|
|
176
104
|
}
|
|
177
105
|
}
|
|
@@ -16,41 +16,34 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"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.)"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"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."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"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."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Keyboard interactions.\n\nKey Interaction TabMoves focus onto or off of the button.Space or EnterExecutes 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."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"content": "Cursor guidelines.\n\nCursor Usage PointerUse the pointer cursor for all interactive components."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"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 ANon‑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, AAAButtons 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 AColor 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 AALarge 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 AAButtons should be built in such a way that they can be resized without assistive technology up to 200%.Visual presentation 1.4.8 AAAThe 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 AAThe visual presentation of icons and various states have a contrast ratio of at least 3:1.Text spacing 1.4.12 AALine 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, AAAAll functionality of the component is operable through a keyboard without specific timing for keystrokes.Keyboard traps 2.1.2 AFocus 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, AAAThere is no flashing content or unnecessary motion or animation in this component.Focus order 2.4.3 ANavigation sequences receive focus in an order that preserves meaning and operability.Focus visible 2.4.7 AAKeyboard states use an indicator that is visible with at least 3:1 contrast."
|
|
40
40
|
}
|
|
41
41
|
],
|
|
42
42
|
"options": {
|
|
43
43
|
"variant": {
|
|
44
44
|
"type": "string",
|
|
45
45
|
"default": "default",
|
|
46
|
-
"values": [
|
|
47
|
-
{
|
|
48
|
-
"value": "default"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"value": "over background"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
46
|
+
"values": [{ "value": "default" }, { "value": "over background" }]
|
|
54
47
|
},
|
|
55
48
|
"value": {
|
|
56
49
|
"type": "number",
|
|
@@ -69,40 +62,17 @@
|
|
|
69
62
|
"size": {
|
|
70
63
|
"type": "string",
|
|
71
64
|
"default": "m",
|
|
72
|
-
"values": [
|
|
73
|
-
{
|
|
74
|
-
"value": "s"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"value": "m"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"value": "l"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
65
|
+
"values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
|
|
83
66
|
},
|
|
84
|
-
"isIndeterminate": {
|
|
85
|
-
"type": "boolean",
|
|
86
|
-
"default": false
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"lifecycle": {
|
|
90
|
-
"introduced": "1.0.0-draft"
|
|
67
|
+
"isIndeterminate": { "type": "boolean", "default": false }
|
|
91
68
|
},
|
|
69
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
92
70
|
"accessibility": {
|
|
93
71
|
"role": "progressbar",
|
|
94
72
|
"focusable": false,
|
|
95
73
|
"wcag": [
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
"level": "A",
|
|
99
|
-
"title": "Name, Role, Value"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"criterion": "4.1.3",
|
|
103
|
-
"level": "AA",
|
|
104
|
-
"title": "Status Messages"
|
|
105
|
-
}
|
|
74
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" },
|
|
75
|
+
{ "criterion": "4.1.3", "level": "AA", "title": "Status Messages" }
|
|
106
76
|
]
|
|
107
77
|
}
|
|
108
78
|
}
|
|
@@ -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
|
}
|