@adobe/spectrum-design-data 3.3.0-beta.0 → 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.
Files changed (81) hide show
  1. package/components/accordion.json +15 -54
  2. package/components/action-bar.json +9 -23
  3. package/components/action-button.json +39 -79
  4. package/components/action-group.json +18 -129
  5. package/components/alert-banner.json +8 -27
  6. package/components/alert-dialog.json +34 -48
  7. package/components/avatar-group.json +9 -28
  8. package/components/avatar.json +29 -92
  9. package/components/badge.json +56 -150
  10. package/components/breadcrumbs.json +26 -100
  11. package/components/button-group.json +19 -50
  12. package/components/button.json +61 -92
  13. package/components/calendar.json +8 -67
  14. package/components/cards.json +31 -46
  15. package/components/checkbox-group.json +16 -78
  16. package/components/checkbox.json +27 -90
  17. package/components/close-button.json +20 -62
  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 +2 -6
  23. package/components/color-slider.json +26 -122
  24. package/components/color-wheel.json +17 -84
  25. package/components/combo-box.json +50 -182
  26. package/components/contextual-help.json +80 -119
  27. package/components/date-picker.json +24 -120
  28. package/components/divider.json +12 -25
  29. package/components/drop-zone.json +18 -30
  30. package/components/field-label.json +21 -62
  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 +24 -56
  35. package/components/list-view.json +15 -73
  36. package/components/menu.json +45 -174
  37. package/components/meter.json +24 -65
  38. package/components/number-field.json +34 -168
  39. package/components/picker.json +42 -181
  40. package/components/popover.json +37 -113
  41. package/components/progress-bar.json +23 -95
  42. package/components/progress-circle.json +12 -42
  43. package/components/radio-button.json +14 -67
  44. package/components/radio-group.json +28 -125
  45. package/components/rating.json +9 -38
  46. package/components/search-field.json +34 -119
  47. package/components/segmented-control.json +21 -63
  48. package/components/select-box.json +29 -96
  49. package/components/side-navigation.json +28 -69
  50. package/components/slider.json +39 -148
  51. package/components/standard-dialog.json +16 -88
  52. package/components/status-light.json +41 -123
  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 +31 -72
  57. package/components/table.json +26 -73
  58. package/components/tabs.json +22 -39
  59. package/components/tag-field.json +14 -60
  60. package/components/tag-group.json +16 -49
  61. package/components/tag.json +21 -71
  62. package/components/takeover-dialog.json +10 -61
  63. package/components/text-area.json +49 -198
  64. package/components/text-field.json +42 -163
  65. package/components/thumbnail.json +22 -63
  66. package/components/toast.json +29 -50
  67. package/components/tooltip.json +27 -74
  68. package/components/tree-view.json +45 -140
  69. package/guidelines/introduction.json +2 -2
  70. package/guidelines/manifest.json +2 -74
  71. package/guidelines/principles.json +2 -2
  72. package/package.json +1 -1
  73. package/guidelines/app-frame-content-area.json +0 -81
  74. package/guidelines/app-frame-creating-bluelines.json +0 -58
  75. package/guidelines/app-frame-header.json +0 -72
  76. package/guidelines/app-frame-side-navigation.json +0 -138
  77. package/guidelines/containers.json +0 -62
  78. package/guidelines/illustrations.json +0 -111
  79. package/guidelines/object-styles.json +0 -102
  80. package/guidelines/spacing.json +0 -25
  81. package/guidelines/typography-fundamentals.json +0 -142
@@ -16,159 +16,86 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "Pickers present a list of options in a compact format for selection. They’re sometimes called “dropdowns” or “selects,” and the available options may change based on context."
19
+ "content": "Minimum width.\n\nThe minimum width for a picker is picker-minimum-width-multiplier (2× the height of the field button). This guarantees that small pickers are readable and easy to target on touch devices. Quiet pickers do not have a minimum width; their width depends on the length of the text."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "The error message communicates an error for when the selection requirements aren’t met, prompting a user to adjust what they had originally selected."
23
+ "content": "Text overflow.\n\nWhen the field label and menu text are too long for the available horizontal space, they wrap to form another line. The field text itself truncates at the end, but the text can be shown in full in the menu."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "A picker can have help text below the field to give extra context or instruction about what a user should input in the field. The help text communicates a hint or helpful information, such as specific requirements for correctly filling out the field."
27
+ "content": "Help and error text overflow.\n\nWhen the help or error text is too long for the available horizontal space, it wraps to form another line."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "A picker can be marked as having an error to show that a value needs to be entered in order to move forward or that a value that was entered is invalid."
31
+ "content": "Menu height.\n\nThe picker menu can be as tall as necessary to show as many options as possible in the available space. There is no maximum height."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "A picker in a disabled state shows that an input field exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that it may become available later."
35
+ "content": "Include a label.\n\nEvery picker should have a label. A picker without a label is ambiguous and not accessible."
36
36
  },
37
37
  {
38
38
  "type": "guideline",
39
- "content": "The picker menu is a menu element that is used to display the options for the picker. A picker menu can include menu items, menu dividers, and menu groups. A picker menu should never contain submenus, as doing so would render it inaccessible."
39
+ "content": "Review label-less designs.\n\nIn rare cases where context is sufficient and a label could be absent, make sure to have the design reviewed and approved by an accessibility expert. These should still include an aria-label in HTML (depending on the context, \"aria-label\" or \"aria-labelledby\")."
40
40
  },
41
41
  {
42
42
  "type": "guideline",
43
- "content": "For required pickers, you have two options:"
43
+ "content": "Keep menu items concise.\n\nKeep menu items short and concise. Long menu items that cause text to wrap to multiple lines are discouraged. If text wrapping becomes a frequent concern, consider revising the text or use alternative UI patterns that will give your content more space."
44
44
  },
45
45
  {
46
46
  "type": "guideline",
47
- "content": "For optional pickers, you have two options:"
47
+ "content": "Choose an appropriate width.\n\nWhen possible, the field button width should be wide enough so that any chosen menu items can be displayed in full."
48
48
  },
49
49
  {
50
50
  "type": "guideline",
51
- "content": "By default, pickers have a visible background. This style works best in a dense array of controls where the background helps to separate the input from the surrounding container, or to give visibility to isolated buttons."
51
+ "content": "Follow capitalization rules.\n\nField labels, placeholder text, and menu items should be in sentence case."
52
52
  },
53
53
  {
54
54
  "type": "guideline",
55
- "content": "Alternatively, quiet pickers can have no visible background. This style works best when a clear layout (vertical stack, table, grid) makes it easy to parse the buttons. Too many quiet components in a small space can be hard to read."
55
+ "content": "Marking required vs. optional pickers in forms.\n\nWhen labeling pickers in a form, only mark the minority type — either required or optional — to reduce visual clutter: If most pickers are optional, mark only the required ones (e.g., add an asterisk or \"(required)\"). If most pickers are required, mark only the optional ones (e.g., append \"(optional)\" to their labels). Never use an asterisk to indicate an optional picker."
56
56
  },
57
57
  {
58
58
  "type": "guideline",
59
- "content": "Pickers 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."
59
+ "content": "Use help text to show context.\n\nA picker's description in the help text is can communicate what to select or how to select an option. This includes information such as: An overall description of the picker options Hints for what kind of information to choose More context for why a user needs to make a selection The help text's message should not simply restate the same information in the label in order to prompt someone to interact with a picker. Don't add help text if it isn't actually relevant or meaningful to a user in order to try to maintain layout continuity with other inputs that require help text."
60
60
  },
61
61
  {
62
62
  "type": "guideline",
63
- "content": "The width of a picker can be customized appropriately for its context. This option is not applicable to quiet pickers."
63
+ "content": "Switch help text with error text.\n\nThe help text area also displays an error message. When a picker already includes help text and an error is triggered, the help text is replaced with error text. Once the error is resolved, the help text description reappears below the picker. Since one gets replaced by the other, the language of the help text and error text need to work together to convey the same messaging. Help text explains the requirement or adds supplementary context for how to complete the interaction. Error text tells a user how to fix the error by re-stating the selection requirements or describing the necessary interaction. Make sure that the help text and the error text include the same essential information so that it isn't lost if one replaces the other like minimum requirements."
64
64
  },
65
65
  {
66
66
  "type": "guideline",
67
- "content": "The value shows the option that a user has selected."
67
+ "content": "Write error text that shows a solution.\n\nWrite error messaging in a human-centered way by guiding a user and showing them a solution — don't simply state what's wrong and then leave them guessing as to how to resolve it. Ambiguous error messages can be frustrating and even shame-inducing for users. Also, keep in mind that something that a system may deem an error may not actually be perceived as an error to a user. Error text should be written in 1-2 short, complete sentences and in a clear and straightforward way. End sentences with a period, and never with an exclamation point. For pickers, the nature of the error is often related to something that needs to be fixed for in-line validation, so a helpful tone is most appropriate. For example, if someone were to miss selecting an option to note as their preferred contact method, write the error text like you're offering a hint or a tip to help guide them to understand what needs to be selected: \"Select a contact method."
68
68
  },
69
69
  {
70
70
  "type": "guideline",
71
- "content": "Placeholder text provides hints about expected input values. It disappears once a user selects an option."
71
+ "content": "Use placeholder text for hints.\n\nPlaceholder text provides hints about expected input values. When implemented properly, it enhances usability without compromising accessibility. Placeholder text: always supplements, never replaces labels; uses disappearing text only for non-critical guidance. It never replaces the help text. is always paired with a visible label; is brief and instructional; is compatible with the screen reader. Ensure that placeholders are properly announced by screen readers by using appropriate ARIA attributes when needed."
72
72
  },
73
73
  {
74
74
  "type": "guideline",
75
- "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."
75
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the picker is mirrored. Text and the checkmark are right-aligned while the chevron is left-aligned."
76
76
  },
77
77
  {
78
78
  "type": "guideline",
79
- "content": "Pickers should always have a label. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the label could be undefined. These pickers without a visible label should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”)."
79
+ "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."
80
80
  },
81
81
  {
82
82
  "type": "guideline",
83
- "content": "When the field label and menu text are too long for the available horizontal space, they wrap to form another line. The field text itself truncates at the end, but the text can be shown in full in the menu."
83
+ "content": "Cursor guidelines.\n\nCursor Usage PointerUse the pointer cursor for all interactive components."
84
84
  },
85
85
  {
86
86
  "type": "guideline",
87
- "content": "When the help or error text is too long for the available horizontal space, it wraps to form another line."
88
- },
89
- {
90
- "type": "guideline",
91
- "content": "The picker menu can be as tall as necessary to show as many options as possible in the available space. There is no maximum height."
92
- },
93
- {
94
- "type": "guideline",
95
- "content": "Every picker should have a label. A picker without a label is ambiguous and not accessible."
96
- },
97
- {
98
- "type": "guideline",
99
- "content": "In rare cases where context is sufficient and a label could be absent, make sure to have the design reviewed and approved by an accessibility expert. These should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”)."
100
- },
101
- {
102
- "type": "guideline",
103
- "content": "Keep menu items short and concise. Long menu items that cause text to wrap to multiple lines are discouraged. If text wrapping becomes a frequent concern, consider revising the text or use alternative UI patterns that will give your content more space."
104
- },
105
- {
106
- "type": "guideline",
107
- "content": "When possible, the field button width should be wide enough so that any chosen menu items can be displayed in full."
108
- },
109
- {
110
- "type": "guideline",
111
- "content": "Field labels, placeholder text, and menu items should be in sentence case."
112
- },
113
- {
114
- "type": "guideline",
115
- "content": "When labeling pickers in a form, only mark the minority type — either required or optional — to reduce visual clutter:"
116
- },
117
- {
118
- "type": "guideline",
119
- "content": "Never use an asterisk to indicate an optional picker."
120
- },
121
- {
122
- "type": "guideline",
123
- "content": "A picker’s description in the help text is can communicate what to select or how to select an option. This includes information such as:"
124
- },
125
- {
126
- "type": "guideline",
127
- "content": "The help text’s message should not simply restate the same information in the label in order to prompt someone to interact with a picker. Don’t add help text if it isn’t actually relevant or meaningful to a user in order to try to maintain layout continuity with other inputs that require help text."
128
- },
129
- {
130
- "type": "guideline",
131
- "content": "The help text area also displays an error message. When a picker already includes help text and an error is triggered, the help text is replaced with error text. Once the error is resolved, the help text description reappears below the picker."
132
- },
133
- {
134
- "type": "guideline",
135
- "content": "Since one gets replaced by the other, the language of the help text and error text need to work together to convey the same messaging. Help text explains the requirement or adds supplementary context for how to complete the interaction. Error text tells a user how to fix the error by re-stating the selection requirements or describing the necessary interaction. Make sure that the help text and the error text include the same essential information so that it isn’t lost if one replaces the other like minimum requirements."
136
- },
137
- {
138
- "type": "guideline",
139
- "content": "Write error messaging in a human-centered way by guiding a user and showing them a solution — don’t simply state what’s wrong and then leave them guessing as to how to resolve it. Ambiguous error messages can be frustrating and even shame-inducing for users. Also, keep in mind that something that a system may deem an error may not actually be perceived as an error to a user."
140
- },
141
- {
142
- "type": "guideline",
143
- "content": "Error text should be written in 1-2 short, complete sentences and in a clear and straightforward way. End sentences with a period, and never with an exclamation point. For pickers, the nature of the error is often related to something that needs to be fixed for in-line validation, so a helpful tone is most appropriate. For example, if someone were to miss selecting an option to note as their preferred contact method, write the error text like you’re offering a hint or a tip to help guide them to understand what needs to be selected: “Select a contact method.”"
144
- },
145
- {
146
- "type": "guideline",
147
- "content": "Placeholder text provides hints about expected input values. When implemented properly, it enhances usability without compromising accessibility."
87
+ "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."
148
88
  }
149
89
  ],
150
90
  "options": {
151
- "label": {
152
- "type": "string"
153
- },
91
+ "label": { "type": "string" },
154
92
  "labelPosition": {
155
93
  "type": "string",
156
94
  "default": "top",
157
- "values": [
158
- {
159
- "value": "top"
160
- },
161
- {
162
- "value": "side"
163
- }
164
- ]
165
- },
166
- "placeholder": {
167
- "type": "string"
168
- },
169
- "value": {
170
- "type": "string"
95
+ "values": [{ "value": "top" }, { "value": "side" }]
171
96
  },
97
+ "placeholder": { "type": "string" },
98
+ "value": { "type": "string" },
172
99
  "width": {
173
100
  "type": "number",
174
101
  "description": "Not applicable to quiet picker."
@@ -177,111 +104,45 @@
177
104
  "type": "string",
178
105
  "default": "m",
179
106
  "values": [
180
- {
181
- "value": "s"
182
- },
183
- {
184
- "value": "m"
185
- },
186
- {
187
- "value": "l"
188
- },
189
- {
190
- "value": "xl"
191
- }
107
+ { "value": "s" },
108
+ { "value": "m" },
109
+ { "value": "l" },
110
+ { "value": "xl" }
192
111
  ]
193
112
  },
194
- "isQuiet": {
195
- "type": "boolean",
196
- "default": false
197
- },
113
+ "isQuiet": { "type": "boolean", "default": false },
198
114
  "necessityIndicator": {
199
115
  "type": "string",
200
116
  "default": "icon",
201
- "values": [
202
- {
203
- "value": "text"
204
- },
205
- {
206
- "value": "icon"
207
- }
208
- ]
209
- },
210
- "isRequired": {
211
- "type": "boolean",
212
- "default": false
117
+ "values": [{ "value": "text" }, { "value": "icon" }]
213
118
  },
119
+ "isRequired": { "type": "boolean", "default": false },
214
120
  "menuContainer": {
215
121
  "type": "string",
216
122
  "default": "popover",
217
- "values": [
218
- {
219
- "value": "popover"
220
- },
221
- {
222
- "value": "tray"
223
- }
224
- ]
225
- },
226
- "isDisabled": {
227
- "type": "boolean",
228
- "default": false
123
+ "values": [{ "value": "popover" }, { "value": "tray" }]
229
124
  },
230
- "isError": {
231
- "type": "boolean",
232
- "default": false
233
- },
234
- "description": {
235
- "type": "string",
236
- "default": null
237
- },
238
- "errorMessage": {
239
- "type": "string",
240
- "default": null
241
- }
125
+ "isDisabled": { "type": "boolean", "default": false },
126
+ "isError": { "type": "boolean", "default": false },
127
+ "description": { "type": "string", "default": null },
128
+ "errorMessage": { "type": "string", "default": null }
242
129
  },
243
130
  "states": [
244
- {
245
- "name": "hover",
246
- "trigger": "interaction"
247
- },
248
- {
249
- "name": "focus-+-hover",
250
- "trigger": "prop"
251
- },
252
- {
253
- "name": "focus-+-not-hover",
254
- "trigger": "prop"
255
- },
256
- {
257
- "name": "keyboard-focus",
258
- "trigger": "interaction"
259
- }
131
+ { "name": "hover", "trigger": "interaction" },
132
+ { "name": "focus-+-hover", "trigger": "prop" },
133
+ { "name": "focus-+-not-hover", "trigger": "prop" },
134
+ { "name": "keyboard-focus", "trigger": "interaction" }
260
135
  ],
261
- "lifecycle": {
262
- "introduced": "1.0.0-draft"
263
- },
136
+ "lifecycle": { "introduced": "1.0.0-draft" },
264
137
  "accessibility": {
265
138
  "role": "combobox",
266
139
  "intents": ["select", "expand"],
267
140
  "focusable": true,
268
141
  "keyboardIntents": ["expand", "collapse", "navigate-options"],
269
142
  "wcag": [
270
- {
271
- "criterion": "1.3.1",
272
- "level": "A",
273
- "title": "Info and Relationships"
274
- },
275
- {
276
- "criterion": "2.1.1",
277
- "level": "A",
278
- "title": "Keyboard"
279
- },
280
- {
281
- "criterion": "4.1.2",
282
- "level": "A",
283
- "title": "Name, Role, Value"
284
- }
143
+ { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
144
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
145
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
285
146
  ]
286
147
  }
287
148
  }
@@ -16,138 +16,71 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "Popovers are containers for transient content like menus, options, or additional actions. They float above the interface and stand out visually using stroke and drop shadow."
19
+ "content": "Source.\n\nPopovers stem off of action buttons that act as a source to open up transient content."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "To keep a popover within certain boundaries, such as a browser window, define a container and a container padding value."
23
+ "content": "Animation.\n\nWhen displaying a popover, it should animate from its source to reinforce the connection between popover and source. It should fade in and slide with subtle motion from the source."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "The cross offset is the placement offset on the cross axis: the x-axis for top and bottom positions, and the y-axis for left and right positions."
27
+ "content": "Dismissing a popover.\n\nA popover can be dismissed by clicking or tapping anywhere outside it, including the source, or by selecting an option or taking an action inside the popover."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "The offset is the space between the source and the popover (or tip, if present). Adjust it as needed to align visually with the source’s perceived bounds and maintain a balanced relationship between the two elements."
31
+ "content": "Popovers vs. trays.\n\nTrays can be used as alternatives to popovers on small screens. Use a tray when the amount of content is too large or overwhelming for a popover."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "A popover is positioned in relation to its source."
35
+ "content": "Show tip when source is ambiguous.\n\nWhen the source that triggers the popover does not have a visually distinct down state, use a popover with a tip to clearly indicate the connection to its source."
36
36
  },
37
37
  {
38
38
  "type": "guideline",
39
- "content": "Popovers usually appear without a tip and rely on a distinct down state in the source to show their origin. When the source lacks that visual cue, add a tip to reinforce the connection between the popover and its source."
39
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the popover is mirrored. Text is right-aligned and buttons are left-aligned."
40
40
  },
41
41
  {
42
42
  "type": "guideline",
43
- "content": "A popover’s height can be customized appropriately for its context."
43
+ "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."
44
44
  },
45
45
  {
46
46
  "type": "guideline",
47
- "content": "A popover’s width can be customized appropriately for its context."
47
+ "content": "Cursor guidelines.\n\nCursor Usage PointerUse the pointer cursor for all interactive components."
48
48
  },
49
49
  {
50
50
  "type": "guideline",
51
- "content": "Popovers stem off of action buttons that act as a source to open up transient content."
52
- },
53
- {
54
- "type": "guideline",
55
- "content": "When displaying a popover, it should animate from its source to reinforce the connection between popover and source. It should fade in and slide with subtle motion from the source."
56
- },
57
- {
58
- "type": "guideline",
59
- "content": "A popover can be dismissed by clicking or tapping anywhere outside it, including the source, or by selecting an option or taking an action inside the popover."
60
- },
61
- {
62
- "type": "guideline",
63
- "content": "Trays can be used as alternatives to popovers on small screens. Use a tray when the amount of content is too large or overwhelming for a popover."
64
- },
65
- {
66
- "type": "guideline",
67
- "content": "When the source that triggers the popover does not have a visually distinct down state, use a popover with a tip to clearly indicate the connection to its source."
51
+ "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."
68
52
  }
69
53
  ],
70
54
  "options": {
71
- "width": {
72
- "type": "number"
73
- },
74
- "height": {
75
- "type": "number"
76
- },
77
- "hideTip": {
78
- "type": "boolean",
79
- "default": false
80
- },
55
+ "width": { "type": "number" },
56
+ "height": { "type": "number" },
57
+ "hideTip": { "type": "boolean", "default": false },
81
58
  "placement": {
82
59
  "type": "string",
83
60
  "default": "top",
84
61
  "values": [
85
- {
86
- "value": "top"
87
- },
88
- {
89
- "value": "top left"
90
- },
91
- {
92
- "value": "top right"
93
- },
94
- {
95
- "value": "top start"
96
- },
97
- {
98
- "value": "top end"
99
- },
100
- {
101
- "value": "bottom"
102
- },
103
- {
104
- "value": "bottom left"
105
- },
106
- {
107
- "value": "bottom right"
108
- },
109
- {
110
- "value": "bottom start"
111
- },
112
- {
113
- "value": "bottom end"
114
- },
115
- {
116
- "value": "left"
117
- },
118
- {
119
- "value": "left top"
120
- },
121
- {
122
- "value": "left bottom"
123
- },
124
- {
125
- "value": "start"
126
- },
127
- {
128
- "value": "start top"
129
- },
130
- {
131
- "value": "start bottom"
132
- },
133
- {
134
- "value": "right"
135
- },
136
- {
137
- "value": "right top"
138
- },
139
- {
140
- "value": "right bottom"
141
- },
142
- {
143
- "value": "end"
144
- },
145
- {
146
- "value": "end top"
147
- },
148
- {
149
- "value": "end bottom"
150
- }
62
+ { "value": "top" },
63
+ { "value": "top left" },
64
+ { "value": "top right" },
65
+ { "value": "top start" },
66
+ { "value": "top end" },
67
+ { "value": "bottom" },
68
+ { "value": "bottom left" },
69
+ { "value": "bottom right" },
70
+ { "value": "bottom start" },
71
+ { "value": "bottom end" },
72
+ { "value": "left" },
73
+ { "value": "left top" },
74
+ { "value": "left bottom" },
75
+ { "value": "start" },
76
+ { "value": "start top" },
77
+ { "value": "start bottom" },
78
+ { "value": "right" },
79
+ { "value": "right top" },
80
+ { "value": "right bottom" },
81
+ { "value": "end" },
82
+ { "value": "end top" },
83
+ { "value": "end bottom" }
151
84
  ]
152
85
  },
153
86
  "offset": {
@@ -155,28 +88,19 @@
155
88
  "default": 8,
156
89
  "description": "pixel measurement"
157
90
  },
158
- "crossOffset": {
159
- "type": "number",
160
- "default": 0
161
- },
91
+ "crossOffset": { "type": "number", "default": 0 },
162
92
  "containerPadding": {
163
93
  "type": "number",
164
94
  "default": 8,
165
95
  "description": "pixel measurement"
166
96
  }
167
97
  },
168
- "lifecycle": {
169
- "introduced": "1.0.0-draft"
170
- },
98
+ "lifecycle": { "introduced": "1.0.0-draft" },
171
99
  "accessibility": {
172
100
  "intents": ["dismiss"],
173
101
  "focusable": false,
174
102
  "wcag": [
175
- {
176
- "criterion": "4.1.2",
177
- "level": "A",
178
- "title": "Name, Role, Value"
179
- }
103
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
180
104
  ]
181
105
  }
182
106
  }