@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.
- package/components/accordion.json +15 -54
- package/components/action-bar.json +9 -23
- package/components/action-button.json +39 -79
- package/components/action-group.json +18 -129
- package/components/alert-banner.json +8 -27
- package/components/alert-dialog.json +34 -48
- package/components/avatar-group.json +9 -28
- package/components/avatar.json +29 -92
- package/components/badge.json +56 -150
- package/components/breadcrumbs.json +26 -100
- package/components/button-group.json +19 -50
- package/components/button.json +61 -92
- package/components/calendar.json +8 -67
- package/components/cards.json +31 -46
- package/components/checkbox-group.json +16 -78
- package/components/checkbox.json +27 -90
- package/components/close-button.json +20 -62
- package/components/coach-indicator.json +14 -44
- package/components/coach-mark.json +8 -26
- package/components/color-area.json +20 -93
- package/components/color-handle.json +25 -38
- package/components/color-loupe.json +2 -6
- package/components/color-slider.json +26 -122
- package/components/color-wheel.json +17 -84
- package/components/combo-box.json +50 -182
- package/components/contextual-help.json +80 -119
- package/components/date-picker.json +24 -120
- package/components/divider.json +12 -25
- package/components/drop-zone.json +18 -30
- package/components/field-label.json +21 -62
- package/components/help-text.json +16 -53
- package/components/illustrated-message.json +21 -72
- package/components/in-line-alert.json +13 -53
- package/components/link.json +24 -56
- package/components/list-view.json +15 -73
- package/components/menu.json +45 -174
- package/components/meter.json +24 -65
- package/components/number-field.json +34 -168
- package/components/picker.json +42 -181
- package/components/popover.json +37 -113
- package/components/progress-bar.json +23 -95
- package/components/progress-circle.json +12 -42
- package/components/radio-button.json +14 -67
- package/components/radio-group.json +28 -125
- package/components/rating.json +9 -38
- package/components/search-field.json +34 -119
- package/components/segmented-control.json +21 -63
- package/components/select-box.json +29 -96
- package/components/side-navigation.json +28 -69
- package/components/slider.json +39 -148
- package/components/standard-dialog.json +16 -88
- package/components/status-light.json +41 -123
- package/components/steplist.json +5 -24
- package/components/swatch-group.json +19 -55
- package/components/swatch.json +24 -79
- package/components/switch.json +31 -72
- package/components/table.json +26 -73
- package/components/tabs.json +22 -39
- package/components/tag-field.json +14 -60
- package/components/tag-group.json +16 -49
- package/components/tag.json +21 -71
- package/components/takeover-dialog.json +10 -61
- package/components/text-area.json +49 -198
- package/components/text-field.json +42 -163
- package/components/thumbnail.json +22 -63
- package/components/toast.json +29 -50
- package/components/tooltip.json +27 -74
- package/components/tree-view.json +45 -140
- package/guidelines/app-frame-overview.json +18 -10
- package/guidelines/applying-the-type-system.json +14 -10
- package/guidelines/attention-hierarchy.json +3 -3
- package/guidelines/background-layers.json +41 -5
- package/guidelines/bi-directionality.json +8 -8
- package/guidelines/border-width.json +17 -1
- package/guidelines/brand.json +6 -6
- package/guidelines/colors.json +24 -12
- package/guidelines/component-spacing.json +14 -2
- package/guidelines/contact-us.json +1 -1
- package/guidelines/content-area-browsing-context.json +11 -11
- package/guidelines/content-design-grammar-and-mechanics.json +241 -0
- package/guidelines/content-design-voice-and-tone.json +37 -0
- package/guidelines/content-grammar-and-mechanics.json +252 -0
- package/guidelines/content-language-and-inclusivity-writing-about-people.json +103 -0
- package/guidelines/content-language-and-inclusivity-writing-with-visuals.json +70 -0
- package/guidelines/content-voice-and-tone.json +47 -0
- package/guidelines/creating-bluelines-browsing-context.json +9 -9
- package/guidelines/design-tokens.json +50 -14
- package/guidelines/drop-shadow.json +13 -1
- package/guidelines/grays.json +5 -5
- package/guidelines/header-browsing-context.json +7 -4
- package/guidelines/icon-fundamentals.json +4 -4
- package/guidelines/illustration.json +21 -25
- package/guidelines/in-product-word-list.json +1 -1
- package/guidelines/inclusive-design.json +14 -6
- package/guidelines/inclusive-ux-writing.json +1 -1
- package/guidelines/internationalization.json +13 -13
- package/guidelines/language-and-inclusivity-writing-about-people.json +85 -0
- package/guidelines/language-and-inclusivity-writing-with-visuals.json +61 -0
- package/guidelines/layout-and-structure-containers.json +7 -7
- package/guidelines/layout-and-structure-spacing-overview.json +66 -0
- package/guidelines/layout-spacing.json +4 -4
- package/guidelines/manifest.json +126 -38
- package/guidelines/motion.json +5 -5
- package/guidelines/object-styles-overview.json +2 -2
- package/guidelines/principles.json +7 -8
- package/guidelines/rounding.json +15 -3
- package/guidelines/side-navigation-browsing-context.json +16 -13
- package/guidelines/spacing-overview.json +7 -7
- package/guidelines/states.json +4 -4
- package/guidelines/support.json +113 -0
- package/guidelines/typography-overview.json +7 -3
- package/guidelines/typography-system.json +56 -16
- package/guidelines/using-icons.json +14 -14
- package/guidelines/visual-language-containers.json +7 -7
- package/guidelines/whats-new.json +32 -0
- package/guidelines/writing-for-errors.json +21 -21
- package/guidelines/writing-for-onboarding.json +17 -17
- package/guidelines/writing-for-readability.json +4 -4
- package/package.json +1 -1
|
@@ -16,248 +16,127 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Minimum width.\n\nThe minimum width for a text field is 1.5 × the height of the field. This minimum width guarantees that small text fields are readable and easy to target on touch devices."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "Text
|
|
23
|
+
"content": "Text overflow.\n\nWhen the field label is too long for the available horizontal space, it wraps to form another line. The field text itself truncates."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Mixed value.\n\nWhen a text field presents multiple values that are not identical, the field should show an en dash (–)."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Help text overflow.\n\nWhen the help text is too long for the available horizontal space, it wraps to form another line."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"content": "Include a label.\n\nEvery text field should have a label. A field without a label is ambiguous and not accessible."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
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": "
|
|
43
|
+
"content": "Follow capitalization rules.\n\nField labels should be in sentence case."
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
47
|
+
"content": "Mark the minority of text fields in a form as required or optional.\n\nIn a single form, mark only the required fields or only the optional fields, depending on whichever is less frequent in the entire form. If most of the text fields are optional, only the required fields should be give an asterisk or have labels appended with \"(required)\". If most of the text fields are required, only the optional fields should be appended with \"(optional)\". An asterisk should never be used to note that a text field is optional."
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
51
|
+
"content": "Use help text to show hints, formatting, and requirements.\n\nThe description in the help text is flexible and encompasses a range of guidance. Sometimes this guidance is about what to input, and sometime it's about how to input. This includes information such as: An overall description of the input field Hints for what kind of information needs to be input Specific formatting examples or requirements The help text's message should not simply restate the same information in the label in order to prompt someone to interact with it. 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."
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
"type": "
|
|
55
|
-
"content": "
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
"type": "guideline",
|
|
59
|
-
"content": "A text field 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. If an error exists, the error icon always overrides the validation icon."
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"type": "guideline",
|
|
63
|
-
"content": "A text field in a disabled state shows that an text field exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that a field may become available later."
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"type": "guideline",
|
|
67
|
-
"content": "A text field 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."
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "guideline",
|
|
71
|
-
"content": "A text field 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. The error message communicates an error for when the field requirements aren’t met, prompting a user to adjust what they had originally input. If an error exists, the error icon always overrides the validation icon."
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "guideline",
|
|
75
|
-
"content": "The minimum width for a text field is 1.5 × the height of the field. This minimum width guarantees that small text fields are readable and easy to target on touch devices."
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "guideline",
|
|
79
|
-
"content": "When the field label is too long for the available horizontal space, it wraps to form another line. The field text itself truncates."
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"type": "guideline",
|
|
83
|
-
"content": "When a text field presents multiple values that are not identical, the field should show an en dash (–)."
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"type": "guideline",
|
|
87
|
-
"content": "When the help text is too long for the available horizontal space, it wraps to form another line."
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"type": "guideline",
|
|
91
|
-
"content": "Every text field should have a label. A field without a label is ambiguous and not accessible."
|
|
54
|
+
"type": "do-dont",
|
|
55
|
+
"content": "Don't use placeholder text",
|
|
56
|
+
"dont": "Putting instructions for how to complete an input, requirements, or any other essential information into placeholder text is not accessible. Once a value is entered, placeholder text is no longer viewable; if someone is using an automatic form filler, they will never get the information in the placeholder text. Instead, use the help text description to convey requirements or to show any formatting examples that would help user comprehension. If there's placeholder text and help text at the same time, it becomes redundant and distracting, especially if they're communicating the same thing."
|
|
92
57
|
},
|
|
93
58
|
{
|
|
94
59
|
"type": "guideline",
|
|
95
|
-
"content": "
|
|
60
|
+
"content": "Switch help text with error text.\n\nThe help text area also displays an error message. When a text field 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 field. 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 successfully complete the input. Error text tells a user how to fix the error by re-stating the input 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 password requirements."
|
|
96
61
|
},
|
|
97
62
|
{
|
|
98
63
|
"type": "guideline",
|
|
99
|
-
"content": "
|
|
64
|
+
"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 text fields, 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 filling out a required field that asks for their email address, write the error text like you're offering a hint or a tip to help guide them to understand what needs to go in the missing field: \"Enter your email address."
|
|
100
65
|
},
|
|
101
66
|
{
|
|
102
67
|
"type": "guideline",
|
|
103
|
-
"content": "
|
|
68
|
+
"content": "RTL.\n\nIn right‑to‑left languages, the text‑field layout is mirrored. The label is right‑aligned, and elements such as the character count, validation marker and error icon are left‑aligned. Keep in mind that some content, including email addresses, does not change direction or translate."
|
|
104
69
|
},
|
|
105
70
|
{
|
|
106
71
|
"type": "guideline",
|
|
107
|
-
"content": "
|
|
72
|
+
"content": "Keyboard interactions.\n\nKey Interaction TabTabbing into a text field moves focus into the field and selects the existing text.Shift + TabMoves focus to the previous focusable element.Printable charactersInserts text at the caret position.Left / Right ArrowMoves caret one character left/right.Home / EndMoves caret to start/end of field value.Backspace / DeleteRemoves character before/after caret.Ctrl / Cmd + ASelects all text.EnterSubmits the enclosing form or triggers the form’s default action (implementation/context dependent)."
|
|
108
73
|
},
|
|
109
74
|
{
|
|
110
75
|
"type": "guideline",
|
|
111
|
-
"content": "
|
|
76
|
+
"content": "Cursor guidelines.\n\nCursor Description TextUse over the field to indicate to the user that text is editable within the field.PointerAny clickable control that is part of the text field (e.g., clear/reveal/help icon) uses the pointer cursor."
|
|
112
77
|
},
|
|
113
78
|
{
|
|
114
79
|
"type": "guideline",
|
|
115
|
-
"content": "
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"type": "guideline",
|
|
119
|
-
"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 successfully complete the input. Error text tells a user how to fix the error by re-stating the input 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 password requirements."
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"type": "guideline",
|
|
123
|
-
"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."
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"type": "guideline",
|
|
127
|
-
"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 text fields, 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 filling out a required field that asks for their email address, write the error text like you’re offering a hint or a tip to help guide them to understand what needs to go in the missing field: “Enter your email address.”"
|
|
80
|
+
"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 inside text fields (e.g., validation, clear, or affordance icons), must provide a text alternative that communicates their purpose. All text fields need an accessible name so screen readers can announce their function.Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAAText fields and their labels, descriptions, and error messages should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized.Contrast 1.4.3 AAThe visual presentation of text has a contrast ratio of at least 4.5:1.Resize text 1.4.4 AAText fields can be resized up to 200% without loss of content or functionality and without assistive technology.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, icons, and component states have a contrast ratio of at least 3:1. Not applicable for empty fields.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."
|
|
128
81
|
}
|
|
129
82
|
],
|
|
130
83
|
"options": {
|
|
131
|
-
"label": {
|
|
132
|
-
"type": "string"
|
|
133
|
-
},
|
|
84
|
+
"label": { "type": "string" },
|
|
134
85
|
"labelPosition": {
|
|
135
86
|
"type": "string",
|
|
136
87
|
"default": "top",
|
|
137
|
-
"values": [
|
|
138
|
-
{
|
|
139
|
-
"value": "top"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"value": "side"
|
|
143
|
-
}
|
|
144
|
-
]
|
|
145
|
-
},
|
|
146
|
-
"hideLabel": {
|
|
147
|
-
"type": "boolean",
|
|
148
|
-
"default": false
|
|
149
|
-
},
|
|
150
|
-
"value": {
|
|
151
|
-
"type": "string",
|
|
152
|
-
"description": "from minValue to maxValue"
|
|
153
|
-
},
|
|
154
|
-
"width": {
|
|
155
|
-
"type": "number"
|
|
88
|
+
"values": [{ "value": "top" }, { "value": "side" }]
|
|
156
89
|
},
|
|
90
|
+
"hideLabel": { "type": "boolean", "default": false },
|
|
91
|
+
"value": { "type": "string", "description": "from minValue to maxValue" },
|
|
92
|
+
"width": { "type": "number" },
|
|
157
93
|
"size": {
|
|
158
94
|
"type": "string",
|
|
159
95
|
"default": "m",
|
|
160
96
|
"values": [
|
|
161
|
-
{
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"value": "m"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"value": "l"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"value": "xl"
|
|
172
|
-
}
|
|
97
|
+
{ "value": "s" },
|
|
98
|
+
{ "value": "m" },
|
|
99
|
+
{ "value": "l" },
|
|
100
|
+
{ "value": "xl" }
|
|
173
101
|
]
|
|
174
102
|
},
|
|
175
103
|
"necessityIndicator": {
|
|
176
104
|
"type": "string",
|
|
177
105
|
"default": "icon",
|
|
178
|
-
"values": [
|
|
179
|
-
{
|
|
180
|
-
"value": "text"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"value": "icon"
|
|
184
|
-
}
|
|
185
|
-
]
|
|
186
|
-
},
|
|
187
|
-
"isRequired": {
|
|
188
|
-
"type": "boolean",
|
|
189
|
-
"default": false
|
|
190
|
-
},
|
|
191
|
-
"hasCharacterCount": {
|
|
192
|
-
"type": "boolean",
|
|
193
|
-
"default": false
|
|
194
|
-
},
|
|
195
|
-
"showValidIcon": {
|
|
196
|
-
"type": "boolean",
|
|
197
|
-
"default": false
|
|
106
|
+
"values": [{ "value": "text" }, { "value": "icon" }]
|
|
198
107
|
},
|
|
108
|
+
"isRequired": { "type": "boolean", "default": false },
|
|
109
|
+
"hasCharacterCount": { "type": "boolean", "default": false },
|
|
110
|
+
"showValidIcon": { "type": "boolean", "default": false },
|
|
199
111
|
"isError": {
|
|
200
112
|
"type": "boolean",
|
|
201
113
|
"default": false,
|
|
202
114
|
"description": "If there is an error, this property overrides show valid icon."
|
|
203
115
|
},
|
|
204
|
-
"isDisabled": {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
"helpText": {
|
|
209
|
-
"type": "string"
|
|
210
|
-
},
|
|
211
|
-
"errorMessage": {
|
|
212
|
-
"type": "string"
|
|
213
|
-
}
|
|
116
|
+
"isDisabled": { "type": "boolean", "default": false },
|
|
117
|
+
"helpText": { "type": "string" },
|
|
118
|
+
"errorMessage": { "type": "string" }
|
|
214
119
|
},
|
|
215
120
|
"states": [
|
|
216
|
-
{
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
{
|
|
221
|
-
"name": "focus-+-hover",
|
|
222
|
-
"trigger": "prop"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "focus-+-not-hover",
|
|
226
|
-
"trigger": "prop"
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
"name": "keyboard-focus",
|
|
230
|
-
"trigger": "interaction"
|
|
231
|
-
}
|
|
121
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
122
|
+
{ "name": "focus-+-hover", "trigger": "prop" },
|
|
123
|
+
{ "name": "focus-+-not-hover", "trigger": "prop" },
|
|
124
|
+
{ "name": "keyboard-focus", "trigger": "interaction" }
|
|
232
125
|
],
|
|
233
|
-
"lifecycle": {
|
|
234
|
-
"introduced": "1.0.0-draft"
|
|
235
|
-
},
|
|
126
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
236
127
|
"accessibility": {
|
|
237
128
|
"role": "textbox",
|
|
238
129
|
"intents": ["input"],
|
|
239
130
|
"focusable": true,
|
|
240
131
|
"wcag": [
|
|
241
|
-
{
|
|
242
|
-
"criterion": "1.3.1",
|
|
243
|
-
"level": "A",
|
|
244
|
-
"title": "Info and Relationships"
|
|
245
|
-
},
|
|
132
|
+
{ "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
|
|
246
133
|
{
|
|
247
134
|
"criterion": "1.3.5",
|
|
248
135
|
"level": "AA",
|
|
249
136
|
"title": "Identify Input Purpose"
|
|
250
137
|
},
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
"level": "A",
|
|
254
|
-
"title": "Keyboard"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"criterion": "4.1.2",
|
|
258
|
-
"level": "A",
|
|
259
|
-
"title": "Name, Role, Value"
|
|
260
|
-
}
|
|
138
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
139
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
261
140
|
]
|
|
262
141
|
}
|
|
263
142
|
}
|
|
@@ -16,94 +16,53 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Keyboard focus.\n\nThumbnails can be navigated using a keyboard in certain scenarios, such as layers or layer masks. When a thumbnail is used as pure representation of an item, focus should be set on the component the thumbnail is used within."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Image.\n\nThumbnails feature rounded corners and may include images with transparency. A subtle inset border helps distinguish images that might otherwise blend into the product's theme colors."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Layer.\n\nWhen thumbnails are used in layer management (such as Treeview, Compact or Detail Layers panels), the thumbnail is given a thick gray border."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Selected layer.\n\nWhen a user selects a thumbnail in layer management, such as in Treeview, Compact or Detail Layers panels, it is highlighted with a thick blue border."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"content": "Using thumbnails in treeview.\n\nTree view items can show thumbnails as an alternative to icons. Thumbnails are best used when a user needs to have a preview of the content represented by the tree view item. Icons can be used as a fallback for when an image is unavailable, but should be appropriately sized to match the thumbnail."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
39
|
+
"content": "Be mindful of thumbnail size and proportions.\n\nTree views with thumbnails should use a thumbnail size that is appropriate to the size of the tree view itself. For example, an extra-large tree view would not work well with small thumbnails; those proportions may be better suited for using icons instead."
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"type": "guideline",
|
|
47
|
-
"content": "Tree views with thumbnails should use a thumbnail size that is appropriate to the size of the tree view itself. For example, an extra-large tree view would not work well with small thumbnails; those proportions may be better suited for using icons instead."
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "guideline",
|
|
51
|
-
"content": "In some cases, multiple thumbnails need to be displayed in-line with the tree view item (e.g., layer masks). These thumbnails should be individually selectable and inherit all other behaviors of a standard tree view item, such as drag-and-drop behavior. Don't use more than 3 thumbnails per tree view item."
|
|
43
|
+
"content": "Multiple thumbnail.\n\nIn some cases, multiple thumbnails need to be displayed in-line with the tree view item (e.g., layer masks). These thumbnails should be individually selectable and inherit all other behaviors of a standard tree view item, such as drag-and-drop behavior. Don't use more than 3 thumbnails per tree view item."
|
|
52
44
|
}
|
|
53
45
|
],
|
|
54
46
|
"options": {
|
|
55
47
|
"size": {
|
|
56
48
|
"type": "number",
|
|
57
49
|
"values": [
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
{
|
|
71
|
-
"value": 300
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"value": 400
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"value": 500
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"value": 600
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"value": 700
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"value": 800
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"value": 900
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"value": 1000
|
|
93
|
-
}
|
|
50
|
+
{ "value": 50 },
|
|
51
|
+
{ "value": 75 },
|
|
52
|
+
{ "value": 100 },
|
|
53
|
+
{ "value": 200 },
|
|
54
|
+
{ "value": 300 },
|
|
55
|
+
{ "value": 400 },
|
|
56
|
+
{ "value": 500 },
|
|
57
|
+
{ "value": 600 },
|
|
58
|
+
{ "value": 700 },
|
|
59
|
+
{ "value": 800 },
|
|
60
|
+
{ "value": 900 },
|
|
61
|
+
{ "value": 1000 }
|
|
94
62
|
]
|
|
95
63
|
}
|
|
96
64
|
},
|
|
97
|
-
"states": [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"trigger": "prop"
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"lifecycle": {
|
|
104
|
-
"introduced": "1.0.0-draft"
|
|
105
|
-
},
|
|
106
|
-
"accessibility": {
|
|
107
|
-
"focusable": false
|
|
108
|
-
}
|
|
65
|
+
"states": [{ "name": "disabled", "trigger": "prop" }],
|
|
66
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
67
|
+
"accessibility": { "focusable": false }
|
|
109
68
|
}
|
package/components/toast.json
CHANGED
|
@@ -16,121 +16,100 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Text overflow.\n\nWhen the text is too long for the available horizontal space, it wraps to form another line. In actionable toasts, the button moves below the text prior to text wrapping."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Multiple toasts.\n\nThe default state can display up to three toasts at a time. To view additional toasts beyond this limit, users can click the \"Show all\" action button. Alternatively, they can reveal remaining toasts by interacting with a button or dismissing the component. Additionally, hovering over the upper part of the toasts triggers a subtle animation, signaling to the user that the group can be fully expanded. The expanded state displays a minimum of two toasts with a visible scroll indicator, while the maximum number adapts based on screen size. Users can either dismiss the toasts or collapse them back to the previous state. To enhance contrast, an overlay is applied beneath the group, similar to components like takeover dialogs. In the React Spectrum implementation, the action button group has a fixed light theme, as switching modes significantly reduces contrast. Please refer to more multiple toasts usage guideline below."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Toast or dialog?\n\nToasts should only be used for confirmations, simple notifications, and low-priority alerts that do not need to completely interrupt the user experience. Dialogs are ideal for when a situation requires a user's attention, either for displaying important information or prompting for a response."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Placement.\n\nBy default, a toast is placed at the bottom center for both desktop and mobile platform scales to avoid disrupting the user experience. For desktop applications, a toast should be placed 16 px away from the bottom of the viewport. If a toast isn't noticeable or disrupts the user experience, its placement can be changed to bottom end, top end, or top center."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"type": "
|
|
35
|
-
"content": "
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
"type": "guideline",
|
|
39
|
-
"content": "The negative toast uses the negative semantic color (red) and has an alert icon to help those with color vision deficiency to discern the message tone. This is used to show an error or failure."
|
|
34
|
+
"type": "do-dont",
|
|
35
|
+
"content": "Don't display more than one action",
|
|
36
|
+
"dont": "Actionable toasts should only have one button."
|
|
40
37
|
},
|
|
41
38
|
{
|
|
42
|
-
"type": "
|
|
43
|
-
"content": "
|
|
39
|
+
"type": "do-dont",
|
|
40
|
+
"content": "Don't include a redundant action",
|
|
41
|
+
"dont": "Actionable toasts should not have a button with a redundant action. For example, including a \"Dismiss\" button would be redundant because all toasts already have a close button."
|
|
44
42
|
},
|
|
45
43
|
{
|
|
46
44
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
45
|
+
"content": "Multiple toasts.\n\nToasts are designed for brief, non-intrusive, and temporary notifications. While displaying multiple toasts is available via the React Spectrum implementation, we still discourage triggering multiple toasts simultaneously when possible, as this can be very distracting to the user. Frequent interruptions interfere with usability, especially for people with visual and cognitive disabilities (see WCAG Success Criterion 2.2.4 Interruptions ). Products should allow for users to be able turn off all types of alerts. Doing this helps people who want to focus and minimize information that they may find non-essential."
|
|
48
46
|
},
|
|
49
47
|
{
|
|
50
48
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
49
|
+
"content": "Confirmation.\n\nFor a confirmation message ( neutral and positive variants), use a short past participle verb phrase: (optional) noun + verb ending in -ed + (optional) prepositional phrase with more information. If you refer to an interface element directly, put its name in bold text."
|
|
52
50
|
},
|
|
53
51
|
{
|
|
54
52
|
"type": "guideline",
|
|
55
|
-
"content": "
|
|
53
|
+
"content": "Informational.\n\nFor an informational message ( informative variant ), write in a complete sentence following the formula of subject + verb phrase + optional additional information."
|
|
56
54
|
},
|
|
57
55
|
{
|
|
58
56
|
"type": "guideline",
|
|
59
|
-
"content": "
|
|
57
|
+
"content": "Error.\n\nFor an error message ( negative variant), use a short phrase — it can be a complete sentence or not — to describe what's happening as succinctly as possible. Whenever possible, include an in-line action for a user to take so that they can readily address the issue explained in the message."
|
|
60
58
|
},
|
|
61
59
|
{
|
|
62
60
|
"type": "guideline",
|
|
63
|
-
"content": "
|
|
61
|
+
"content": "Write in sentence case with no period.\n\nLike all in-product content at Adobe, toasts and their actions are written in sentence case. If the toast's message is a single sentence, do not add a period to the end; this helps keep the text quicker to read and easier to parse. Toasts should ideally only be a single sentence, but if you need to use two or more sentences to most accurately communicate the information, add a period to the end of each sentence."
|
|
64
62
|
},
|
|
65
63
|
{
|
|
66
64
|
"type": "guideline",
|
|
67
|
-
"content": "
|
|
65
|
+
"content": "Use an instructive tone.\n\nToasts offer quick reference or context, so a user should be able to quickly read a message that's brief and optimized for delivery. Use an instructive tone that presents the message in a concise and neutral way. Because users are likely to see several toasts in quick succession, it's not appropriate to use overly playful, encouraging, or celebratory language. Just convey the message, then get out of the way so that they can get back to the task at hand. Toasts are not appropriate for promotional messaging or upsells that show the benefit of doing or trying something."
|
|
68
66
|
},
|
|
69
67
|
{
|
|
70
68
|
"type": "guideline",
|
|
71
|
-
"content": "
|
|
69
|
+
"content": "Use generic language.\n\nWhenever possible, use generic language in confirmation and error messages. This approach allows for better localization and it also reduces the need to write many different versions of toasts for similar use cases. It's usually unnecessary to include specific filenames, usernames, or folders because a user can get that context from elsewhere in the UI."
|
|
72
70
|
},
|
|
73
71
|
{
|
|
74
72
|
"type": "guideline",
|
|
75
|
-
"content": "
|
|
73
|
+
"content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the toast is mirrored. The icon is right-aligned and the close button is left-aligned. If the toast is actionable, the button placement is also inverted and appears on the left side."
|
|
76
74
|
},
|
|
77
75
|
{
|
|
78
76
|
"type": "guideline",
|
|
79
|
-
"content": "
|
|
77
|
+
"content": "Keyboard interactions.\n\nKey Interaction TabPlaces the focus on the next interactive element, which is either a button or a close button.Shift + TabPlaces the focus on the previous interactive element, which is either a button or a close button.Space or EnterIf focus is on the close button, dismisses the toast. If focus is on the button, executes the button action.EscDismisses the toast. This is equivalent to selecting the close button."
|
|
80
78
|
},
|
|
81
79
|
{
|
|
82
80
|
"type": "guideline",
|
|
83
|
-
"content": "
|
|
81
|
+
"content": "Cursor guidelines.\n\nCursor Usage Default (Arrow)Use the default cursor for non-interactive areas on the toast.PointerUse the pointer cursor for interactive areas on the toast such as the close button."
|
|
84
82
|
},
|
|
85
83
|
{
|
|
86
84
|
"type": "guideline",
|
|
87
|
-
"content": "
|
|
85
|
+
"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 toasts—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, AAAToasts 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 AColor is never used as the sole way to convey meaning in toasts. Toasts use color to reinforce their meaning, but every toast also includes a clear text description that communicates purpose.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.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 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.Text spacing1.4.12AALine height of text is at least 1.5x the font size in wrapped tooltips. 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.Timing adjustable 2.2.1 AToasts should not auto-dismiss. If they do, users need a way to extend, pause, or dismiss time-limited content. Hovering, clicking, or keyboard focusing on the toast should keep it from disappearing.Seizures and physical feactions 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."
|
|
88
86
|
}
|
|
89
87
|
],
|
|
90
88
|
"options": {
|
|
91
|
-
"text": {
|
|
92
|
-
"type": "string"
|
|
93
|
-
},
|
|
89
|
+
"text": { "type": "string" },
|
|
94
90
|
"variant": {
|
|
95
91
|
"type": "string",
|
|
96
92
|
"default": "neutral",
|
|
97
93
|
"values": [
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"value": "informative"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"value": "positive"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"value": "negative"
|
|
109
|
-
}
|
|
94
|
+
{ "value": "neutral" },
|
|
95
|
+
{ "value": "informative" },
|
|
96
|
+
{ "value": "positive" },
|
|
97
|
+
{ "value": "negative" }
|
|
110
98
|
]
|
|
111
99
|
},
|
|
112
100
|
"actionLabel": {
|
|
113
101
|
"type": "string",
|
|
114
102
|
"description": "If undefined, this button does not appear."
|
|
115
103
|
},
|
|
116
|
-
"isAutoDismissible": {
|
|
117
|
-
"type": "boolean",
|
|
118
|
-
"default": false
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"lifecycle": {
|
|
122
|
-
"introduced": "1.0.0-draft"
|
|
104
|
+
"isAutoDismissible": { "type": "boolean", "default": false }
|
|
123
105
|
},
|
|
106
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
124
107
|
"accessibility": {
|
|
125
108
|
"intents": ["dismiss"],
|
|
126
109
|
"focusable": true,
|
|
127
110
|
"keyboardIntents": ["dismiss"],
|
|
128
111
|
"wcag": [
|
|
129
|
-
{
|
|
130
|
-
"criterion": "4.1.3",
|
|
131
|
-
"level": "AA",
|
|
132
|
-
"title": "Status Messages"
|
|
133
|
-
}
|
|
112
|
+
{ "criterion": "4.1.3", "level": "AA", "title": "Status Messages" }
|
|
134
113
|
]
|
|
135
114
|
}
|
|
136
115
|
}
|