@adobe/spectrum-design-data 3.3.0-beta.0 → 3.3.0-beta.2

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 (119) 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/app-frame-overview.json +18 -10
  70. package/guidelines/applying-the-type-system.json +14 -10
  71. package/guidelines/attention-hierarchy.json +3 -3
  72. package/guidelines/background-layers.json +41 -5
  73. package/guidelines/bi-directionality.json +8 -8
  74. package/guidelines/border-width.json +17 -1
  75. package/guidelines/brand.json +6 -6
  76. package/guidelines/colors.json +24 -12
  77. package/guidelines/component-spacing.json +14 -2
  78. package/guidelines/contact-us.json +1 -1
  79. package/guidelines/content-area-browsing-context.json +11 -11
  80. package/guidelines/content-design-grammar-and-mechanics.json +241 -0
  81. package/guidelines/content-design-voice-and-tone.json +37 -0
  82. package/guidelines/content-grammar-and-mechanics.json +252 -0
  83. package/guidelines/content-language-and-inclusivity-writing-about-people.json +103 -0
  84. package/guidelines/content-language-and-inclusivity-writing-with-visuals.json +70 -0
  85. package/guidelines/content-voice-and-tone.json +47 -0
  86. package/guidelines/creating-bluelines-browsing-context.json +9 -9
  87. package/guidelines/design-tokens.json +50 -14
  88. package/guidelines/drop-shadow.json +13 -1
  89. package/guidelines/grays.json +5 -5
  90. package/guidelines/header-browsing-context.json +7 -4
  91. package/guidelines/icon-fundamentals.json +4 -4
  92. package/guidelines/illustration.json +21 -25
  93. package/guidelines/in-product-word-list.json +1 -1
  94. package/guidelines/inclusive-design.json +14 -6
  95. package/guidelines/inclusive-ux-writing.json +1 -1
  96. package/guidelines/internationalization.json +13 -13
  97. package/guidelines/language-and-inclusivity-writing-about-people.json +85 -0
  98. package/guidelines/language-and-inclusivity-writing-with-visuals.json +61 -0
  99. package/guidelines/layout-and-structure-containers.json +7 -7
  100. package/guidelines/layout-and-structure-spacing-overview.json +66 -0
  101. package/guidelines/layout-spacing.json +4 -4
  102. package/guidelines/manifest.json +126 -38
  103. package/guidelines/motion.json +5 -5
  104. package/guidelines/object-styles-overview.json +2 -2
  105. package/guidelines/principles.json +7 -8
  106. package/guidelines/rounding.json +15 -3
  107. package/guidelines/side-navigation-browsing-context.json +16 -13
  108. package/guidelines/spacing-overview.json +7 -7
  109. package/guidelines/states.json +4 -4
  110. package/guidelines/support.json +113 -0
  111. package/guidelines/typography-overview.json +7 -3
  112. package/guidelines/typography-system.json +56 -16
  113. package/guidelines/using-icons.json +14 -14
  114. package/guidelines/visual-language-containers.json +7 -7
  115. package/guidelines/whats-new.json +32 -0
  116. package/guidelines/writing-for-errors.json +21 -21
  117. package/guidelines/writing-for-onboarding.json +17 -17
  118. package/guidelines/writing-for-readability.json +4 -4
  119. package/package.json +1 -1
@@ -16,202 +16,110 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "A disabled menu item indicates that an option exists but isn’t available in the current context. This helps preserve layout consistency and signals that the action might be available later."
19
+ "content": "Drill-in chevron.\n\nWhen a menu item includes a submenu, a drill-in chevron appears at the end of the item to indicate that additional options are available."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "An unavailable menu item signals that an option exists but isn’t accessible in the current scenario. This helps ensure the label remains visible and provides context about why the option is unavailable, or directions for how to make it available."
23
+ "content": "Link-out icon.\n\nWhen a menu item leads to a different context, such as a new page or dialog, a link-out icon appears at the end of the item to indicate that the user will navigate away from the current view."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "Displays submenus in a collapsed, nested format within the parent menu container. Works with both popover and tray styles. When using a tray, set a fixed height to avoid disorienting shifts when items expand or collapse."
27
+ "content": "Popover submenus.\n\nWhen a menu is displayed within popovers, a submenu will appear adjacent to the parent menu item in a separate popover. The submenu popover is aligned with an offset to horizontally overlap the parent menu and vertically align the first submenu item with the parent menu item. When a menu is shown in a popover, any submenu appears in a separate popover next to the parent item. The submenu popover is positioned to overlap the parent menu horizontally, with vertical alignment that matches the first submenu item to its parent."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "Use a section header when a menu section requires a label or descriptor. Section headers are helpful when two or more sections differ in function or context, making it easier for users to understand the structure."
31
+ "content": "Tray submenus.\n\nWhen a menu is shown in a tray, selecting a parent item with a submenu replaces the tray's content with the submenu. A back button labeled with the parent item's title appears at the top of the tray to let users return to the previous menu level."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "When the selection option is enabled, the selection can be displayed using checkmarks, checkboxes or switches. Switches are more commonly used on mobile."
35
+ "content": "Keyboard focus.\n\nA menu item can be navigated using a keyboard. The keyboard focus state takes the menu item's visual hover state and adds a focus ring around the item."
36
36
  },
37
37
  {
38
38
  "type": "guideline",
39
- "content": "A menu section has the options of single selection, multiple selection, or having no selection. By default, menu items have no selection, and perform an action on press."
39
+ "content": "Text overflow.\n\nWhen a menu item's label or description are too long for the available horizontal space, they wrap to form another line."
40
40
  },
41
41
  {
42
42
  "type": "guideline",
43
- "content": "For single selection menu sections, menu items show a single checkmark to indicate the selected item. Multiple selection menu sections can display checkboxes or switches beside each menu item."
43
+ "content": "Section dividers.\n\nDividers appear between sections when two or more sections are used within the same menu."
44
44
  },
45
45
  {
46
46
  "type": "guideline",
47
- "content": "Menus come in four different sizes: small, medium, large, and extra-large. Medium is the default and most commonly used. Menu sizes should correspond to the size of the menu trigger component (like an action button), and any embedded components (like switches) should follow suit."
47
+ "content": "Windows high contrast mode.\n\nIn Windows high contrast mode, menu items should display with default text color. Selected items should have the background and text colors defined for selected text."
48
48
  },
49
49
  {
50
50
  "type": "guideline",
51
- "content": "Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page."
51
+ "content": "Use consistent sizing.\n\nMenus should be sized according to the component being used as the menu trigger. All submenus within the menu should also be using the same size as the menu trigger."
52
52
  },
53
53
  {
54
54
  "type": "guideline",
55
- "content": "A menu item can display a related value in the value area. Examples of values include the selected option from a submenu, a keyboard shortcut for the action, or other content that clarifies the menu item."
55
+ "content": "Use sentence case for menu items.\n\nFollowing Adobe's UX writing style, write menu items in sentence case unless they contain words that are branded terms."
56
56
  },
57
57
  {
58
58
  "type": "guideline",
59
- "content": "Menu items can include description text to provide extra clarity beyond the label. Descriptions help users understand the action and make informed choices."
59
+ "content": "Ellipses in menu commands.\n\nDon't end a menu command with an ellipsis (…) unless it requires additional input to complete the action, typically in a dialog."
60
60
  },
61
61
  {
62
62
  "type": "guideline",
63
- "content": "Avoid cluttering items with repetitive details or promotional content."
63
+ "content": "Using descriptions in menu items.\n\nOnly use descriptions in menu items when the information will help a user to decide which action to take from the menu. Don't overload menu items with repetitive information or with promotional calls-to-action."
64
64
  },
65
65
  {
66
66
  "type": "guideline",
67
- "content": "Menu items can include icons, but only when they add meaningful context — not just for decoration. Use icons when they have a strong, recognizable association with the label (like tool switching in a toolbar)."
67
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the entire menu is mirrored horizontally, including the direction of the drill-in chevron and popover placement for submenus."
68
68
  },
69
69
  {
70
70
  "type": "guideline",
71
- "content": "A menu item must include a label that clearly communicates the action or option it represents."
71
+ "content": "Keyboard interactions.\n\nKey Interaction Enter or SpaceOpens menu and moves focus to first item.Down Arrow (on trigger)Opens menu and moves focus to first item.Up Arrow (on trigger, optional)Opens menu and moves focus to last item.Up Arrow / Down Arrow (in menu)Moves focus to previous/next item at the current menu level (wrapping behavior may be implementation-defined).Right Arrow / Left ArrowIn submenu hierarchies: opens child submenu or returns to parent menu item (direction follows hierarchy and orientation).Home / EndMoves focus to first/last item in current menu level.Printable character keysMoves focus to the next item whose label begins with typed character(s) (typeahead).Enter or Space (on item)Activates item. For checkbox/radio/switch items, may toggle state and optionally keep menu open based on selection behavior.EscCloses current submenu/menu and returns focus to parent item or menu trigger.Tab / Shift + TabExits menu, closes open menus, and moves focus to next/previous focusable element."
72
72
  },
73
73
  {
74
74
  "type": "guideline",
75
- "content": "On desktop, menus are shown in a popover by default. On mobile, popovers can be used when appropriate. Submenus cascade in a separate popover by default."
75
+ "content": "Cursor guidelines.\n\nCursor Description PointerUse the pointer cursor for all interactive components in every state."
76
76
  },
77
77
  {
78
78
  "type": "guideline",
79
- "content": "When a menu item includes a submenu, a drill-in chevron appears at the end of the item to indicate that additional options are available."
80
- },
81
- {
82
- "type": "guideline",
83
- "content": "When a menu item leads to a different context, such as a new page or dialog, a link-out icon appears at the end of the item to indicate that the user will navigate away from the current view."
84
- },
85
- {
86
- "type": "guideline",
87
- "content": "When a menu is displayed within popovers, a submenu will appear adjacent to the parent menu item in a separate popover. The submenu popover is aligned with an offset to horizontally overlap the parent menu and vertically align the first submenu item with the parent menu item."
88
- },
89
- {
90
- "type": "guideline",
91
- "content": "When a menu is shown in a popover, any submenu appears in a separate popover next to the parent item. The submenu popover is positioned to overlap the parent menu horizontally, with vertical alignment that matches the first submenu item to its parent."
92
- },
93
- {
94
- "type": "guideline",
95
- "content": "When a menu is shown in a tray, selecting a parent item with a submenu replaces the tray’s content with the submenu. A back button labeled with the parent item’s title appears at the top of the tray to let users return to the previous menu level."
96
- },
97
- {
98
- "type": "guideline",
99
- "content": "A menu item can be navigated using a keyboard. The keyboard focus state takes the menu item’s visual hover state and adds a focus ring around the item."
100
- },
101
- {
102
- "type": "guideline",
103
- "content": "When a menu item’s label or description are too long for the available horizontal space, they wrap to form another line."
104
- },
105
- {
106
- "type": "guideline",
107
- "content": "Dividers appear between sections when two or more sections are used within the same menu."
108
- },
109
- {
110
- "type": "guideline",
111
- "content": "In Windows high contrast mode, menu items should display with default text color. Selected items should have the background and text colors defined for selected text."
112
- },
113
- {
114
- "type": "guideline",
115
- "content": "Menus should be sized according to the component being used as the menu trigger. All submenus within the menu should also be using the same size as the menu trigger."
116
- },
117
- {
118
- "type": "guideline",
119
- "content": "Following Adobe’s UX writing style, write menu items in sentence case unless they contain words that are branded terms."
120
- },
121
- {
122
- "type": "guideline",
123
- "content": "Don’t end a menu command with an ellipsis (…) unless it requires additional input to complete the action, typically in a dialog."
79
+ "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 menu items, must provide a text alternative that communicates the item's purpose. All menu items, especially icon-only items, 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, AAAMenus must be understandable to assistive technologies, such as screen readers. Use proper semantic HTML or the appropriate ARIA roles to ensure accessibility.Text contrast 1.4.3 AAThe visual presentation of text has a contrast ratio of at least 4.5:1.Resize text 1.4.4 AAMenus 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 illustrations and component 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 RequirementCriterionLevel 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."
124
80
  }
125
81
  ],
126
82
  "options": {
127
83
  "container": {
128
84
  "type": "string",
129
- "values": [
130
- {
131
- "value": "popover"
132
- },
133
- {
134
- "value": "tray"
135
- }
136
- ]
137
- },
138
- "label": {
139
- "type": "string"
85
+ "values": [{ "value": "popover" }, { "value": "tray" }]
140
86
  },
87
+ "label": { "type": "string" },
141
88
  "icon": {
142
89
  "$ref": "https://opensource.adobe.com/spectrum-design-data/schemas/types/workflow-icon.json",
143
90
  "description": "Icon must be present if the label is not defined."
144
91
  },
145
- "description": {
146
- "type": "string"
147
- },
148
- "value": {
149
- "type": "string"
150
- },
92
+ "description": { "type": "string" },
93
+ "value": { "type": "string" },
151
94
  "size": {
152
95
  "type": "string",
153
96
  "default": "m",
154
97
  "values": [
155
- {
156
- "value": "s"
157
- },
158
- {
159
- "value": "m"
160
- },
161
- {
162
- "value": "l"
163
- },
164
- {
165
- "value": "xl"
166
- }
98
+ { "value": "s" },
99
+ { "value": "m" },
100
+ { "value": "l" },
101
+ { "value": "xl" }
167
102
  ]
168
103
  },
169
104
  "selectionMode": {
170
105
  "type": "string",
171
106
  "values": [
172
- {
173
- "value": "single"
174
- },
175
- {
176
- "value": "multiple"
177
- },
178
- {
179
- "value": "no selection"
180
- }
107
+ { "value": "single" },
108
+ { "value": "multiple" },
109
+ { "value": "no selection" }
181
110
  ]
182
111
  },
183
112
  "selectionStyle": {
184
113
  "type": "string",
185
- "values": [
186
- {
187
- "value": "checkbox"
188
- },
189
- {
190
- "value": "switch"
191
- }
192
- ]
193
- },
194
- "sectionHeader": {
195
- "type": "string"
114
+ "values": [{ "value": "checkbox" }, { "value": "switch" }]
196
115
  },
197
- "isCollapsible": {
198
- "type": "boolean",
199
- "default": false
200
- },
201
- "isUnavailable": {
202
- "type": "boolean",
203
- "default": false
204
- },
205
- "isDisabled": {
206
- "type": "boolean",
207
- "default": false
208
- }
116
+ "sectionHeader": { "type": "string" },
117
+ "isCollapsible": { "type": "boolean", "default": false },
118
+ "isUnavailable": { "type": "boolean", "default": false },
119
+ "isDisabled": { "type": "boolean", "default": false }
209
120
  },
210
121
  "anatomy": [
211
- {
212
- "name": "item-label",
213
- "description": "Label text of a menu item."
214
- },
122
+ { "name": "item-label", "description": "Label text of a menu item." },
215
123
  {
216
124
  "name": "menu-item",
217
125
  "description": "A single row within the menu.",
@@ -227,22 +135,13 @@
227
135
  "link-out-icon"
228
136
  ]
229
137
  },
230
- {
231
- "name": "icon",
232
- "description": "Leading icon of a menu item."
233
- },
234
- {
235
- "name": "label",
236
- "description": "Primary label text of a menu item."
237
- },
138
+ { "name": "icon", "description": "Leading icon of a menu item." },
139
+ { "name": "label", "description": "Primary label text of a menu item." },
238
140
  {
239
141
  "name": "description",
240
142
  "description": "Secondary descriptive text of a menu item."
241
143
  },
242
- {
243
- "name": "value",
244
- "description": "Current value display of a menu item."
245
- },
144
+ { "name": "value", "description": "Current value display of a menu item." },
246
145
  {
247
146
  "name": "switch",
248
147
  "description": "Switch control for a menu item with switch selection style."
@@ -251,10 +150,7 @@
251
150
  "name": "checkbox",
252
151
  "description": "Checkbox control for a menu item with checkbox selection style."
253
152
  },
254
- {
255
- "name": "thumbnail",
256
- "description": "Thumbnail image of a menu item."
257
- },
153
+ { "name": "thumbnail", "description": "Thumbnail image of a menu item." },
258
154
  {
259
155
  "name": "drill-in-chevron",
260
156
  "description": "Chevron indicating a menu item opens a sub-menu."
@@ -265,46 +161,21 @@
265
161
  }
266
162
  ],
267
163
  "states": [
268
- {
269
- "name": "hover",
270
- "trigger": "interaction"
271
- },
272
- {
273
- "name": "down",
274
- "trigger": "interaction"
275
- },
276
- {
277
- "name": "keyboard-focus",
278
- "trigger": "interaction"
279
- },
280
- {
281
- "name": "default",
282
- "trigger": "prop"
283
- },
284
- {
285
- "name": "disabled",
286
- "trigger": "prop"
287
- }
164
+ { "name": "hover", "trigger": "interaction" },
165
+ { "name": "down", "trigger": "interaction" },
166
+ { "name": "keyboard-focus", "trigger": "interaction" },
167
+ { "name": "default", "trigger": "prop" },
168
+ { "name": "disabled", "trigger": "prop" }
288
169
  ],
289
- "lifecycle": {
290
- "introduced": "1.0.0-draft"
291
- },
170
+ "lifecycle": { "introduced": "1.0.0-draft" },
292
171
  "accessibility": {
293
172
  "role": "menu",
294
173
  "intents": ["select"],
295
174
  "focusable": false,
296
175
  "keyboardIntents": ["navigate-options", "activate", "dismiss"],
297
176
  "wcag": [
298
- {
299
- "criterion": "2.1.1",
300
- "level": "A",
301
- "title": "Keyboard"
302
- },
303
- {
304
- "criterion": "4.1.2",
305
- "level": "A",
306
- "title": "Name, Role, Value"
307
- }
177
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
178
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
308
179
  ]
309
180
  }
310
181
  }
@@ -16,39 +16,35 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "A meter can include help text below it to explain what the value means and how to reach the target. This text may include units, value ranges, thresholds like targets or warnings, and actions that affect the meter."
19
+ "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."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "The value represents a user-driven quantity or achievement, such as tutorials completed or storage used. Unlike a progress bar, it reflects user actions, not system activity."
23
+ "content": "Progress bar vs. meter.\n\nA progress bar fills automatically as the system loads either determinately or indeterminately. A user's actions do not affect the progress bar; it just indicates how long they must wait for the process to finish. A meter indicates how much the user has completed or how far they are in a continuum."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "Meters come in four different sizes: small, medium, large, and extra-large. By default, meters use medium size. Use the small size when there are multiple meters shown at the same time in a more confined space, such as in tables or cards."
27
+ "content": "Labels.\n\nUse the built-in style for showing a label associated with the meter. By default, the label is start-aligned and an optional value is end-aligned above the track. (In left-to-right languages, this means the label appears on the left and the value on the right; in right-to-left languages, this flips.) The label should be written in sentence case. When meters appear in a table, you may use the column header as the label. In this case, set labelPosition=\"side\" or use hideLabel if the column header fully describes what each meter represents."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "Meters can include a value label to show details like “60%” or “2 of 8.” It should only appear if the main label is shown and is always placed above the track."
31
+ "content": "Representing semantic values.\n\nMeter variants can be used to represent semantic values by switching variants as the value changes, from positive, to notice, and then to negative. This kind of variant switching should be handled appropriately within the context of your product so that you're setting accurate expectations for your users about the semantic meaning."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "Meters should always have a label placed above the track. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the label could be undefined. These meters without a visible label should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”)."
35
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the meter is mirrored. The label is right-aligned, the value is left-aligned, and the fill progresses from right to left. Beware that the placement of the percent sign differs depending on the locale."
36
36
  },
37
37
  {
38
38
  "type": "guideline",
39
- "content": "Meter has four variants: informative, positive, notice, and negative."
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": "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."
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": "Use the built-in style for showing a label associated with the meter. By default, the label is start-aligned and an optional value is end-aligned above the track. (In left-to-right languages, this means the label appears on the left and the value on the right; in right-to-left languages, this flips.) The label should be written in sentence case."
48
- },
49
- {
50
- "type": "guideline",
51
- "content": "Meter variants can be used to represent semantic values by switching variants as the value changes, from positive, to notice, and then to negative. This kind of variant switching should be handled appropriately within the context of your product so that you’re setting accurate expectations for your users about the semantic meaning."
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."
52
48
  }
53
49
  ],
54
50
  "options": {
@@ -56,72 +52,35 @@
56
52
  "type": "string",
57
53
  "default": "informative",
58
54
  "values": [
59
- {
60
- "value": "informative"
61
- },
62
- {
63
- "value": "positive"
64
- },
65
- {
66
- "value": "notice"
67
- },
68
- {
69
- "value": "negative"
70
- }
55
+ { "value": "informative" },
56
+ { "value": "positive" },
57
+ { "value": "notice" },
58
+ { "value": "negative" }
71
59
  ]
72
60
  },
73
- "label": {
74
- "type": "string"
75
- },
76
- "hideLabel": {
77
- "type": "boolean",
78
- "default": false
79
- },
80
- "valueLabel": {
81
- "type": "string"
82
- },
83
- "width": {
84
- "type": "number"
85
- },
61
+ "label": { "type": "string" },
62
+ "hideLabel": { "type": "boolean", "default": false },
63
+ "valueLabel": { "type": "string" },
64
+ "width": { "type": "number" },
86
65
  "size": {
87
66
  "type": "string",
88
67
  "default": "m",
89
68
  "values": [
90
- {
91
- "value": "s"
92
- },
93
- {
94
- "value": "m"
95
- },
96
- {
97
- "value": "l"
98
- },
99
- {
100
- "value": "xl"
101
- }
69
+ { "value": "s" },
70
+ { "value": "m" },
71
+ { "value": "l" },
72
+ { "value": "xl" }
102
73
  ]
103
74
  },
104
- "value": {
105
- "type": "number",
106
- "minimum": 0,
107
- "maximum": 1
108
- },
109
- "helpText": {
110
- "type": "string"
111
- }
112
- },
113
- "lifecycle": {
114
- "introduced": "1.0.0-draft"
75
+ "value": { "type": "number", "minimum": 0, "maximum": 1 },
76
+ "helpText": { "type": "string" }
115
77
  },
78
+ "lifecycle": { "introduced": "1.0.0-draft" },
116
79
  "accessibility": {
117
80
  "role": "meter",
118
81
  "focusable": false,
119
82
  "wcag": [
120
- {
121
- "criterion": "4.1.2",
122
- "level": "A",
123
- "title": "Name, Role, Value"
124
- }
83
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
125
84
  ]
126
85
  }
127
86
  }