@adobe/spectrum-design-data 3.2.3 → 3.3.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) 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/ai-resource-guide.json +50 -0
  70. package/guidelines/app-frame-overview.json +44 -50
  71. package/guidelines/applying-the-type-system.json +63 -0
  72. package/guidelines/attention-hierarchy.json +12 -21
  73. package/guidelines/background-layers.json +44 -10
  74. package/guidelines/bi-directionality.json +57 -0
  75. package/guidelines/border-width.json +42 -0
  76. package/guidelines/brand.json +30 -10
  77. package/guidelines/cognitive.json +197 -0
  78. package/guidelines/colors.json +35 -17
  79. package/guidelines/component-spacing.json +49 -0
  80. package/guidelines/contact-us.json +67 -0
  81. package/guidelines/content-area-browsing-context.json +65 -0
  82. package/guidelines/creating-bluelines-browsing-context.json +91 -0
  83. package/guidelines/design-tokens.json +122 -0
  84. package/guidelines/developer-overview.json +25 -9
  85. package/guidelines/drop-shadow.json +56 -0
  86. package/guidelines/faqs.json +96 -9
  87. package/guidelines/fonts.json +29 -14
  88. package/guidelines/grammar-and-mechanics.json +252 -0
  89. package/guidelines/grays.json +17 -44
  90. package/guidelines/header-browsing-context.json +37 -0
  91. package/guidelines/icon-fundamentals.json +7 -18
  92. package/guidelines/illustration.json +109 -0
  93. package/guidelines/in-product-word-list.json +29 -0
  94. package/guidelines/inclusive-design.json +93 -0
  95. package/guidelines/inclusive-ux-writing.json +30 -0
  96. package/guidelines/internationalization.json +87 -0
  97. package/guidelines/introduction.json +2 -2
  98. package/guidelines/layout-and-structure-containers.json +47 -0
  99. package/guidelines/layout-spacing.json +39 -0
  100. package/guidelines/manifest.json +252 -60
  101. package/guidelines/motion.json +17 -16
  102. package/guidelines/object-styles-overview.json +17 -0
  103. package/guidelines/principles.json +2 -2
  104. package/guidelines/resources.json +21 -15
  105. package/guidelines/rounding.json +61 -0
  106. package/guidelines/side-navigation-browsing-context.json +71 -0
  107. package/guidelines/spacing-overview.json +45 -0
  108. package/guidelines/states.json +15 -10
  109. package/guidelines/typography-overview.json +39 -0
  110. package/guidelines/typography-system.json +168 -0
  111. package/guidelines/using-icons.json +33 -44
  112. package/guidelines/visual-language-containers.json +36 -0
  113. package/guidelines/voice-and-tone.json +47 -0
  114. package/guidelines/writing-about-people.json +103 -0
  115. package/guidelines/writing-for-errors.json +120 -0
  116. package/guidelines/writing-for-onboarding.json +119 -0
  117. package/guidelines/writing-for-readability.json +54 -0
  118. package/guidelines/writing-with-visuals.json +70 -0
  119. package/package.json +1 -1
  120. package/guidelines/app-frame-content-area.json +0 -81
  121. package/guidelines/app-frame-creating-bluelines.json +0 -58
  122. package/guidelines/app-frame-header.json +0 -72
  123. package/guidelines/app-frame-side-navigation.json +0 -138
  124. package/guidelines/containers.json +0 -62
  125. package/guidelines/illustrations.json +0 -111
  126. package/guidelines/object-styles.json +0 -102
  127. package/guidelines/spacing.json +0 -25
  128. package/guidelines/typography-fundamentals.json +0 -142
@@ -51,14 +51,7 @@
51
51
  "orientation": {
52
52
  "type": "string",
53
53
  "default": "horizontal",
54
- "values": [
55
- {
56
- "value": "horizontal"
57
- },
58
- {
59
- "value": "vertical"
60
- }
61
- ]
54
+ "values": [{ "value": "horizontal" }, { "value": "vertical" }]
62
55
  },
63
56
  "items": {
64
57
  "type": "array",
@@ -100,28 +93,16 @@
100
93
  "name": "track-size",
101
94
  "description": "The connecting track between steps."
102
95
  },
103
- {
104
- "name": "track"
105
- }
96
+ { "name": "track" }
106
97
  ],
107
- "lifecycle": {
108
- "introduced": "1.0.0-draft"
109
- },
98
+ "lifecycle": { "introduced": "1.0.0-draft" },
110
99
  "accessibility": {
111
100
  "intents": ["navigate"],
112
101
  "focusable": true,
113
102
  "keyboardIntents": ["navigate-items", "activate"],
114
103
  "wcag": [
115
- {
116
- "criterion": "2.1.1",
117
- "level": "A",
118
- "title": "Keyboard"
119
- },
120
- {
121
- "criterion": "4.1.2",
122
- "level": "A",
123
- "title": "Name, Role, Value"
124
- }
104
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
105
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
125
106
  ]
126
107
  }
127
108
  }
@@ -16,23 +16,23 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "Swatch groups organize related swatches into a single container. They’re used to display collections of colors, gradients, textures, or materials for comparison or selection."
19
+ "content": "Border only for low-contrast swatches.\n\nIt's important for users to compare colors when they're displayed in a swatch group. Because of this, swatches within a swatch group with low contrast (below 3:1 contrast with the background) have a less prominent border compared to the swatch component when used by itself. This reduces the likelihood of the UI interfering with color perception and comparisons."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "Swatch groups come in 3 densities: regular (default), compact, and spacious. Compact and spacious densities retain the same swatch size as regular density but have less or more padding between each swatch, respectively."
23
+ "content": "Corner rounding in swatch groups.\n\nA corner rounding of none should be used in a swatch group in order to help minimize the Hermann grid illusion that happens at the intersections of the white space within the group. The only exception is when a swatch group only takes up a single row. In that case, use any of the rounding options: none, partial rounding, or full rounding."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "By default, selection is not enabled in a swatch group. Selection can be enabled for a swatch group to allow for toggling. This is often used inside of swatch panels."
27
+ "content": "Keyboard interactions.\n\nKey Interaction TabMoves focus onto the swatch or swatch group.Arrow keysMoves focus through the swatches in the group."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "When selection is enabled, a swatch group can allow for either single or multiple selection of swatches. This is often used inside of swatch panels to allow for bulk operations, such as deleting multiple swatches at once."
31
+ "content": "Cursor guidelines.\n\nCursor Description PointerUse the pointer cursor for all interactive elements in every state."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "It’s important for users to compare colors when they’re displayed in a swatch group. Because of this, swatches within a swatch group with low contrast (below 3:1 contrast with the background) have a less prominent border compared to the swatch component when used by itself. This reduces the likelihood of the UI interfering with color perception and comparisons."
35
+ "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 must provide a text alternative that communicates the control’s purpose. All controls, especially icon‑only controls, 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, AAASwatch groups should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized, so the grouping relationship between swatches and the selected state are programmatically conveyed.Use of color 1.4.1 AThis criterion requires that color not be the only method of communicating information. In swatches, the color itself is the content being presented, not a cue that conveys additional meaning. 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."
36
36
  }
37
37
  ],
38
38
  "options": {
@@ -40,51 +40,27 @@
40
40
  "type": "string",
41
41
  "default": "m",
42
42
  "values": [
43
- {
44
- "value": "xs"
45
- },
46
- {
47
- "value": "s"
48
- },
49
- {
50
- "value": "m"
51
- },
52
- {
53
- "value": "l"
54
- }
43
+ { "value": "xs" },
44
+ { "value": "s" },
45
+ { "value": "m" },
46
+ { "value": "l" }
55
47
  ]
56
48
  },
57
49
  "density": {
58
50
  "type": "string",
59
51
  "default": "regular",
60
52
  "values": [
61
- {
62
- "value": "compact"
63
- },
64
- {
65
- "value": "regular"
66
- },
67
- {
68
- "value": "spacious"
69
- }
53
+ { "value": "compact" },
54
+ { "value": "regular" },
55
+ { "value": "spacious" }
70
56
  ]
71
57
  },
72
- "enableSelection": {
73
- "type": "boolean",
74
- "default": false
75
- },
58
+ "enableSelection": { "type": "boolean", "default": false },
76
59
  "selectionMode": {
77
60
  "type": "string",
78
61
  "description": "Only applicable if selection is enabled.",
79
62
  "default": "single",
80
- "values": [
81
- {
82
- "value": "single"
83
- },
84
- {
85
- "value": "multiple"
86
- }
87
- ]
63
+ "values": [{ "value": "single" }, { "value": "multiple" }]
88
64
  },
89
65
  "allowsEmptySelection": {
90
66
  "type": "boolean",
@@ -96,31 +72,19 @@
96
72
  "default": "none",
97
73
  "description": "Determines the corner radius of each swatch in the group. Partial refers to corner-radius-75.",
98
74
  "values": [
99
- {
100
- "value": "none"
101
- },
102
- {
103
- "value": "full"
104
- },
105
- {
106
- "value": "partial"
107
- }
75
+ { "value": "none" },
76
+ { "value": "full" },
77
+ { "value": "partial" }
108
78
  ]
109
79
  }
110
80
  },
111
- "lifecycle": {
112
- "introduced": "1.0.0-draft"
113
- },
81
+ "lifecycle": { "introduced": "1.0.0-draft" },
114
82
  "accessibility": {
115
83
  "role": "group",
116
84
  "intents": ["choose"],
117
85
  "focusable": false,
118
86
  "wcag": [
119
- {
120
- "criterion": "4.1.2",
121
- "level": "A",
122
- "title": "Name, Role, Value"
123
- }
87
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
124
88
  ]
125
89
  }
126
90
  }
@@ -16,31 +16,27 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "The preview shows the sample of the fill that the swatch represents. This property can be a color, gradient, texture, or material. The exact format this property takes will depend on implementation. Some examples of the format include color values, image, canvas, and gradient."
19
+ "content": "Keyboard focus.\n\nA swatch can be navigated using a keyboard. The keyboard focus state adds a blue ring to the swatch in focus."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "Swatches come in four different sizes: extra-small, small, medium, and 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."
23
+ "content": "Mixed value.\n\nWhen a swatch represents multiple values that are not identical, the preview shows a gray fill and a dash UI icon."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "By default, swatches have partial rounding. There are 3 options for a swatch’s rounding: none, partial rounding, and full rounding."
27
+ "content": "Hide unavailable swatches when possible.\n\nEven though swatches can have a disabled state, hiding unavailable swatches reduces visual clutter and eases cognitive load. Only show disabled swatches if hiding them would cause confusion to your users."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "A swatch can have a selected state to allow for selection. This is often used in a swatch group."
31
+ "content": "Keyboard interactions.\n\nKeyInteractionTabMoves focus onto or off of the swatch group. Focus moves to the first swatch in the group.Space or EnterTriggers an action or selects the swatch when selection is enabled. The focus remains on the swatch, unless the swatch opens or closes the current container. In this case, the focus moves to the target or back to the caller."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "A swatch in a disabled state shows that the swatch exists, but is not available in that circumstance. This state can be used to maintain layout continuity and to communicate that a swatch may become available later. Disabled swatches should be used with caution."
35
+ "content": "Cursor guidelines.\n\nCursor Description PointerUse the pointer cursor for all interactive elements in every state."
36
36
  },
37
37
  {
38
38
  "type": "guideline",
39
- "content": "A swatch can be navigated using a keyboard. The keyboard focus state adds a blue ring to the swatch in focus."
40
- },
41
- {
42
- "type": "guideline",
43
- "content": "Even though swatches can have a disabled state, hiding unavailable swatches reduces visual clutter and eases cognitive load. Only show disabled swatches if hiding them would cause confusion to your users."
39
+ "content": "WCAG 2.2 compliance.\n\nAny criterion not mention in the below table are not applicable to this component or are resolved with underlying requirements, engineering, and styles of the entire system. 1. Perceivable Requirement Criterion Level Compliance Non-text content 1.1.1 ANon‑text elements must provide a text alternative that communicates the control’s purpose. All controls, especially icon‑only controls, 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, AAASwatch groups should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized, so the grouping relationship between swatches and the selected state are programmatically conveyed.Use of color 1.4.1 AThis criterion requires that color not be the only method of communicating information. In swatches, the color itself is the content being presented, not a cue that conveys additional meaning. 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."
44
40
  }
45
41
  ],
46
42
  "options": {
@@ -52,102 +48,51 @@
52
48
  "type": "string",
53
49
  "default": "m",
54
50
  "values": [
55
- {
56
- "value": "xs"
57
- },
58
- {
59
- "value": "s"
60
- },
61
- {
62
- "value": "m"
63
- },
64
- {
65
- "value": "l"
66
- }
51
+ { "value": "xs" },
52
+ { "value": "s" },
53
+ { "value": "m" },
54
+ { "value": "l" }
67
55
  ]
68
56
  },
69
57
  "shape": {
70
58
  "type": "string",
71
59
  "default": "square",
72
- "values": [
73
- {
74
- "value": "square"
75
- },
76
- {
77
- "value": "rectangle"
78
- }
79
- ]
60
+ "values": [{ "value": "square" }, { "value": "rectangle" }]
80
61
  },
81
62
  "cornerRounding": {
82
63
  "type": "string",
83
64
  "default": "none",
84
65
  "description": "Determines the corner radius of the swatch. Partial refers to corner-radius-75.",
85
66
  "values": [
86
- {
87
- "value": "none"
88
- },
89
- {
90
- "value": "partial"
91
- },
92
- {
93
- "value": "full"
94
- }
67
+ { "value": "none" },
68
+ { "value": "partial" },
69
+ { "value": "full" }
95
70
  ]
96
71
  },
97
- "isSelected": {
98
- "type": "boolean",
99
- "default": false
100
- },
101
- "isDisabled": {
102
- "type": "boolean",
103
- "default": false
104
- }
72
+ "isSelected": { "type": "boolean", "default": false },
73
+ "isDisabled": { "type": "boolean", "default": false }
105
74
  },
106
75
  "anatomy": [
107
76
  {
108
77
  "name": "slash",
109
78
  "description": "Diagonal slash indicating an empty or \"none\" swatch."
110
79
  },
111
- {
112
- "name": "icon"
113
- }
80
+ { "name": "icon" }
114
81
  ],
115
82
  "states": [
116
- {
117
- "name": "hover",
118
- "trigger": "interaction"
119
- },
120
- {
121
- "name": "down",
122
- "trigger": "interaction"
123
- },
124
- {
125
- "name": "keyboard-focus",
126
- "trigger": "interaction"
127
- },
128
- {
129
- "name": "disabled",
130
- "trigger": "prop"
131
- }
83
+ { "name": "hover", "trigger": "interaction" },
84
+ { "name": "down", "trigger": "interaction" },
85
+ { "name": "keyboard-focus", "trigger": "interaction" },
86
+ { "name": "disabled", "trigger": "prop" }
132
87
  ],
133
- "lifecycle": {
134
- "introduced": "1.0.0-draft"
135
- },
88
+ "lifecycle": { "introduced": "1.0.0-draft" },
136
89
  "accessibility": {
137
90
  "intents": ["choose"],
138
91
  "focusable": true,
139
92
  "keyboardIntents": ["activate"],
140
93
  "wcag": [
141
- {
142
- "criterion": "2.1.1",
143
- "level": "A",
144
- "title": "Keyboard"
145
- },
146
- {
147
- "criterion": "4.1.2",
148
- "level": "A",
149
- "title": "Name, Role, Value"
150
- }
94
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
95
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
151
96
  ]
152
97
  }
153
98
  }
@@ -16,141 +16,100 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "Switches toggle an individual option on or off. They're typically used to activate or deactivate a specific setting."
19
+ "content": "Keyboard focus.\n\nA switch can be navigated using a keyboard. The keyboard focus state takes the switch's visual hover state and adds a blue ring to the switch in focus."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "Switch should always have a label for accessibility and clear comprehension. When the label is not defined, a switch becomes standalone. Standalone switches 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 label is too long for the horizontal space available, it wraps to form another line."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "Switches can either be selected or not selected. They cannot be in an indeterminate state (unlike checkboxes). When a switch represents multiple values that are not identical, the switch should appear as not selected."
27
+ "content": "When to use an emphasized switch?\n\nEmphasized switches are optimal for forms, settings, and other scenarios where the switches need to be noticed. Not emphasized switches are optimal for application panels where all the visual components are monochrome in order to direct focus to the canvas."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "Switch 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."
31
+ "content": "When to use a standalone switch?\n\nStandalone switches should be used in situations where the context is clear without an associated text label. For example, a switch located at the top of a panel next to the panel's title makes it clear that the switch will enable/disable the panel options."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "By default, switches are not emphasized (gray). This version is optimal for when the switch 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."
35
+ "content": "Switch, checkbox or radio button?\n\nSwitches 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). Radio buttons are best when only one option can be selected at a time from a set (e.g., choosing one preference or mode)."
36
36
  },
37
37
  {
38
38
  "type": "guideline",
39
- "content": "The emphasized (blue) version provides a visual prominence that is optimal for forms, settings, lists or grids of assets, and other situations where a switch needs to be noticed."
39
+ "content": "Representing mixed values.\n\nWhen a switch represents multiple values that are not identical, the switch should appear as not selected. Any subsequent click or tap should select the switch, and update all values to be selected. Another click or tap after that should deselect the switch, and update all values to be not selected."
40
40
  },
41
41
  {
42
42
  "type": "guideline",
43
- "content": "A switch in a disabled state shows that an action exists, but is not available in that circumstance. This state can be used to maintain layout continuity and to communicate that an action may become available later."
43
+ "content": "No partial state.\n\nSwitches can only be on or off. Indeterminate switches don't exist in accessibility APIs, so it's not possible to make an indeterminate switch accessible. If you need to show a partial state, use a checkbox instead of a switch. When a parent switch represents a group of switches, it should be turned off unless all of the switches are on (turning the parent switch on turns all of the switches on)."
44
44
  },
45
45
  {
46
46
  "type": "guideline",
47
- "content": "Switches have a read-only option for when they’re in the disabled state but still need their labels to be shown. This allows for content to be copied, but not interacted with or changed."
47
+ "content": "Consider if the label should use a verb or a noun.\n\nA switch shows a state of persistence for something — a noun or a proper noun — as either being \"on\" or \"off.\" A verb isn't usually needed to communicate the thing being turned on or off, but there can be instances where phrasing the label as a verb can aid in clarity. Just try to keep switches consistently using either verbs or nouns if you have more than one of them in a single view."
48
48
  },
49
49
  {
50
50
  "type": "guideline",
51
- "content": "A switch can be navigated using a keyboard. The keyboard focus state takes the switch’s visual hover state and adds a blue ring to the switch in focus."
51
+ "content": "Avoid using verb phrases related to a state of activity.\n\nAvoid using verb phrases related to activity states in a switch label, such as \"turn on\" or \"turn off.\" A switch is naturally either in a state of being on or off — active or inactive — so repeating in the label that something is \"on\" or \"off\" is redundant and clutters an interface."
52
52
  },
53
53
  {
54
54
  "type": "guideline",
55
- "content": "When the label is too long for the horizontal space available, it wraps to form another line."
55
+ "content": "Use a neutral tone.\n\nBecause switches are used for controls and utility, their labels are written in a neutral, utilitarian way. There's no need for overly celebratory language."
56
56
  },
57
57
  {
58
58
  "type": "guideline",
59
- "content": "Emphasized switches are optimal for forms, settings, and other scenarios where the switches need to be noticed. Not emphasized switches are optimal for application panels where all the visual components are monochrome in order to direct focus to the canvas."
59
+ "content": "Use \"you\" or \"your\" if needed to refer to the user directly.\n\nDescribe switches objectively by using only the names of features or settings, or what those features and settings will do. In the case where it's necessary to refer to a user directly, do so sparingly and use the second person \"you/your.\" We aim to be conversational and talk to the user — not as them."
60
60
  },
61
61
  {
62
62
  "type": "guideline",
63
- "content": "Standalone switches should be used in situations where the context is clear without an associated text label. For example, a switch located at the top of a panel next to the panel's title makes it clear that the switch will enable/disable the panel options."
63
+ "content": "Use sentence case.\n\nFollowing Adobe's UX writing style, labels for switches are written in sentence case unless they contain words that are branded terms."
64
64
  },
65
65
  {
66
66
  "type": "guideline",
67
- "content": "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). Radio buttons are best when only one option can be selected at a time from a set (e.g., choosing one preference or mode)."
67
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the switch is mirrored. The track is placed on the right side of the text and the handle is positioned to the left when the switch is turned on."
68
68
  },
69
69
  {
70
70
  "type": "guideline",
71
- "content": "When a switch represents multiple values that are not identical, the switch should appear as not selected. Any subsequent click or tap should select the switch, and update all values to be selected. Another click or tap after that should deselect the switch, and update all values to be not selected."
71
+ "content": "Keyboard interactions.\n\nKey Interaction TabMoves focus to the next item or group of items.Shift + TabMoves focus to the previous item or group of items.Space or EnterToggles the switch between on and off."
72
72
  },
73
73
  {
74
74
  "type": "guideline",
75
- "content": "Switches can only be on or off. Indeterminate switches don’t exist in accessibility APIs, so it’s not possible to make an indeterminate switch accessible. If you need to show a partial state, use a checkbox instead of a switch."
75
+ "content": "Cursor guidelines.\n\nCursor Description PointerUse the pointer cursor for interactive elements in all states."
76
76
  },
77
77
  {
78
78
  "type": "guideline",
79
- "content": "When a parent switch represents a group of switches, it should be turned off unless all of the switches are on (turning the parent switch on turns all of the switches on)."
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 Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAASwitches should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized.Use of color 1.4.1 ASwitches never rely on color alone to convey meaning. The active state uses blue to reinforce “on,” and the handle shifts position to clearly show whether the switch is on or off.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 AASwitches should be built in such a way that they can be resized without assistive technology up to 200%.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 when the label is wrapped. 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."
80
80
  }
81
81
  ],
82
82
  "options": {
83
- "label": {
84
- "type": "string"
85
- },
86
- "isSelected": {
87
- "type": "boolean",
88
- "default": false
89
- },
83
+ "label": { "type": "string" },
84
+ "isSelected": { "type": "boolean", "default": false },
90
85
  "size": {
91
86
  "type": "string",
92
87
  "default": "m",
93
88
  "values": [
94
- {
95
- "value": "s"
96
- },
97
- {
98
- "value": "m"
99
- },
100
- {
101
- "value": "l"
102
- },
103
- {
104
- "value": "xl"
105
- }
89
+ { "value": "s" },
90
+ { "value": "m" },
91
+ { "value": "l" },
92
+ { "value": "xl" }
106
93
  ]
107
94
  },
108
- "isEmphasized": {
109
- "type": "boolean",
110
- "default": false
111
- },
112
- "isDisabled": {
113
- "type": "boolean",
114
- "default": false
115
- },
116
- "isReadOnly": {
117
- "type": "boolean",
118
- "default": false
119
- }
95
+ "isEmphasized": { "type": "boolean", "default": false },
96
+ "isDisabled": { "type": "boolean", "default": false },
97
+ "isReadOnly": { "type": "boolean", "default": false }
120
98
  },
121
99
  "states": [
122
- {
123
- "name": "hover",
124
- "trigger": "interaction"
125
- },
126
- {
127
- "name": "down",
128
- "trigger": "interaction"
129
- },
130
- {
131
- "name": "keyboard-focus",
132
- "trigger": "interaction"
133
- }
100
+ { "name": "hover", "trigger": "interaction" },
101
+ { "name": "down", "trigger": "interaction" },
102
+ { "name": "keyboard-focus", "trigger": "interaction" }
134
103
  ],
135
- "lifecycle": {
136
- "introduced": "1.0.0-draft"
137
- },
104
+ "lifecycle": { "introduced": "1.0.0-draft" },
138
105
  "accessibility": {
139
106
  "role": "switch",
140
107
  "intents": ["choose"],
141
108
  "focusable": true,
142
109
  "keyboardIntents": ["activate"],
143
110
  "wcag": [
144
- {
145
- "criterion": "2.1.1",
146
- "level": "A",
147
- "title": "Keyboard"
148
- },
149
- {
150
- "criterion": "4.1.2",
151
- "level": "A",
152
- "title": "Name, Role, Value"
153
- }
111
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
112
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
154
113
  ]
155
114
  }
156
115
  }