@adobe/spectrum-design-data 3.3.0 → 3.4.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.
Files changed (121) hide show
  1. package/components/accordion.json +32 -102
  2. package/components/action-bar.json +9 -23
  3. package/components/action-button.json +52 -92
  4. package/components/action-group.json +18 -129
  5. package/components/alert-banner.json +8 -27
  6. package/components/alert-dialog.json +45 -55
  7. package/components/avatar-group.json +20 -50
  8. package/components/avatar.json +44 -123
  9. package/components/badge.json +66 -160
  10. package/components/breadcrumbs.json +26 -100
  11. package/components/button-group.json +32 -63
  12. package/components/button.json +74 -105
  13. package/components/calendar.json +8 -67
  14. package/components/cards.json +31 -46
  15. package/components/checkbox-group.json +22 -84
  16. package/components/checkbox.json +33 -96
  17. package/components/close-button.json +31 -73
  18. package/components/coach-indicator.json +14 -44
  19. package/components/coach-mark.json +8 -26
  20. package/components/color-area.json +20 -93
  21. package/components/color-handle.json +25 -38
  22. package/components/color-loupe.json +18 -18
  23. package/components/color-slider.json +26 -122
  24. package/components/color-wheel.json +17 -84
  25. package/components/combo-box.json +56 -188
  26. package/components/contextual-help.json +87 -126
  27. package/components/date-picker.json +24 -120
  28. package/components/divider.json +25 -38
  29. package/components/drop-zone.json +25 -37
  30. package/components/field-label.json +22 -59
  31. package/components/help-text.json +16 -53
  32. package/components/illustrated-message.json +21 -72
  33. package/components/in-line-alert.json +13 -53
  34. package/components/link.json +31 -63
  35. package/components/list-view.json +15 -73
  36. package/components/menu.json +51 -180
  37. package/components/meter.json +35 -76
  38. package/components/number-field.json +34 -168
  39. package/components/picker.json +48 -187
  40. package/components/popover.json +47 -123
  41. package/components/progress-bar.json +33 -105
  42. package/components/progress-circle.json +25 -55
  43. package/components/radio-button.json +14 -67
  44. package/components/radio-group.json +34 -131
  45. package/components/rating.json +9 -38
  46. package/components/search-field.json +40 -125
  47. package/components/segmented-control.json +27 -69
  48. package/components/select-box.json +29 -96
  49. package/components/side-navigation.json +28 -69
  50. package/components/slider.json +45 -154
  51. package/components/standard-dialog.json +16 -88
  52. package/components/status-light.json +51 -133
  53. package/components/steplist.json +5 -24
  54. package/components/swatch-group.json +19 -55
  55. package/components/swatch.json +24 -79
  56. package/components/switch.json +42 -79
  57. package/components/table.json +26 -73
  58. package/components/tabs.json +35 -52
  59. package/components/tag-field.json +14 -60
  60. package/components/tag-group.json +22 -55
  61. package/components/tag.json +27 -77
  62. package/components/takeover-dialog.json +10 -61
  63. package/components/text-area.json +55 -204
  64. package/components/text-field.json +48 -169
  65. package/components/thumbnail.json +22 -63
  66. package/components/toast.json +30 -47
  67. package/components/tooltip.json +37 -84
  68. package/components/tree-view.json +51 -146
  69. package/fields/structure.json +1 -2
  70. package/guidelines/ai-resource-guide.json +42 -0
  71. package/guidelines/app-frame-overview.json +45 -44
  72. package/guidelines/applying-the-type-system.json +71 -0
  73. package/guidelines/attention-hierarchy.json +13 -22
  74. package/guidelines/background-layers.json +84 -10
  75. package/guidelines/bi-directionality.json +57 -0
  76. package/guidelines/border-width.json +70 -0
  77. package/guidelines/brand.json +24 -12
  78. package/guidelines/cognitive.json +229 -0
  79. package/guidelines/colors.json +55 -17
  80. package/guidelines/component-spacing.json +65 -0
  81. package/guidelines/contact-us.json +27 -0
  82. package/guidelines/containers.json +21 -28
  83. package/guidelines/content-area-browsing-context.json +73 -0
  84. package/guidelines/creating-bluelines-browsing-context.json +71 -0
  85. package/guidelines/design-tokens.json +186 -0
  86. package/guidelines/developer-overview.json +33 -9
  87. package/guidelines/drop-shadow.json +76 -0
  88. package/guidelines/faqs.json +100 -9
  89. package/guidelines/fonts.json +33 -14
  90. package/guidelines/grammar-and-mechanics.json +276 -0
  91. package/guidelines/grays.json +17 -44
  92. package/guidelines/header-browsing-context.json +40 -0
  93. package/guidelines/icon-fundamentals.json +7 -18
  94. package/guidelines/illustration.json +120 -0
  95. package/guidelines/in-product-word-list.json +25 -0
  96. package/guidelines/inclusive-design.json +101 -0
  97. package/guidelines/inclusive-ux-writing.json +34 -0
  98. package/guidelines/internationalization.json +103 -0
  99. package/guidelines/layout-spacing.json +39 -0
  100. package/guidelines/manifest.json +280 -16
  101. package/guidelines/motion.json +18 -13
  102. package/guidelines/object-styles-overview.json +17 -0
  103. package/guidelines/principles.json +7 -8
  104. package/guidelines/resources.json +29 -15
  105. package/guidelines/rounding.json +85 -0
  106. package/guidelines/side-navigation-browsing-context.json +74 -0
  107. package/guidelines/spacing-overview.json +78 -0
  108. package/guidelines/states.json +16 -11
  109. package/guidelines/support.json +125 -0
  110. package/guidelines/typography-overview.json +39 -0
  111. package/guidelines/typography-system.json +212 -0
  112. package/guidelines/using-icons.json +32 -47
  113. package/guidelines/voice-and-tone.json +51 -0
  114. package/guidelines/whats-new.json +21 -0
  115. package/guidelines/writing-about-people.json +99 -0
  116. package/guidelines/writing-for-errors.json +140 -0
  117. package/guidelines/writing-for-onboarding.json +123 -0
  118. package/guidelines/writing-for-readability.json +66 -0
  119. package/guidelines/writing-with-visuals.json +78 -0
  120. package/package.json +2 -2
  121. 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": "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."
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": "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."
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 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”)."
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": "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."
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": "Use the over background variant when a progress bar needs to be placed on top of a colored background or visual."
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": "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."
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": "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."
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": "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
- },
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
- "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."
52
+ "platform": "web",
53
+ "componentName": "ProgressBar",
54
+ "package": "@react-spectrum/s2"
81
55
  },
82
56
  {
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..."
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
- "type": "string"
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
- "value": "s"
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
- "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
- }
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": "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."
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": "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."
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": "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."
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": "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."
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": "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.)"
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": "Small progress circles are well suited when space is limited both vertically and horizontally, such as in buttons, menu items, and input fields."
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
- "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
- }
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": "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."
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": "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."
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": "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."
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": "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."
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": "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)."
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
- "type": "boolean",
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
- "name": "hover",
79
- "trigger": "interaction"
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
- "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
- }
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
  }