@adobe/spectrum-design-data 3.3.0-beta.0 → 3.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/introduction.json +2 -2
- package/guidelines/manifest.json +2 -74
- package/guidelines/principles.json +2 -2
- package/package.json +1 -1
- package/guidelines/app-frame-content-area.json +0 -81
- package/guidelines/app-frame-creating-bluelines.json +0 -58
- package/guidelines/app-frame-header.json +0 -72
- package/guidelines/app-frame-side-navigation.json +0 -138
- package/guidelines/containers.json +0 -62
- package/guidelines/illustrations.json +0 -111
- package/guidelines/object-styles.json +0 -102
- package/guidelines/spacing.json +0 -25
- package/guidelines/typography-fundamentals.json +0 -142
|
@@ -16,81 +16,63 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Mutually exclusive items.\n\nSegmented controls have one item selected by default at all times, and are mutually exclusive. This means selecting one item automatically deselects the others."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Selection.\n\nClicking on a segmented control item immediately performs the view change."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Text overflow.\n\nWhen the segmented control item text is too long for the available horizontal space, it truncates at the end. The full text should be revealed with a tooltip on hover."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Tooltips for hidden labels.\n\nIcon-only or truncated label segmented controls can be hard to identify. They should display a tooltip after a brief hover, showing the name and a keyboard shortcut, if applicable."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "Segmented controls
|
|
35
|
+
"content": "Segmented controls are for view switching.\n\nSegmented controls are only meant to be used to change the way you view information on a page. They should not be used for navigating, filtering content, or taking actions."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
39
|
+
"content": "Segmented controls vs. similar components.\n\nUse a segmented control when the primary goal is to switch views of content. Tabs are reserved for navigation. Action groups are for triggering actions. Tag groups are for filtering content."
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
43
|
+
"content": "Use icons only when they have a clear meaning.\n\nIt may not make sense in every case to include icons. If the items are too complicated to convey in an icon, don't force it. Keep in mind that if one segmented control has an icon, then they all should have an icon."
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"type": "guideline",
|
|
47
|
-
"content": "
|
|
47
|
+
"content": "Keep segmented control groups to 5 items or less.\n\nSegmented control groups work best with 2 to 5 items. If your component needs more than 5 items, consider using a dropdown or radio button group instead."
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
"type": "
|
|
51
|
-
"content": "
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
"type": "guideline",
|
|
55
|
-
"content": "When the segmented control item text is too long for the available horizontal space, it truncates at the end. The full text should be revealed with a tooltip on hover."
|
|
50
|
+
"type": "do-dont",
|
|
51
|
+
"content": "Don't use segmented control as actions, to make selections, or to navigate",
|
|
52
|
+
"dont": "Segmented control groups are meant for switching views on a page. To navigate to a different page or progressively disclose different content, use tabs instead. To perform actions or make a selection, use action groups."
|
|
56
53
|
},
|
|
57
54
|
{
|
|
58
55
|
"type": "guideline",
|
|
59
|
-
"content": "
|
|
56
|
+
"content": "RTL.\n\nThe order of the buttons in the segmented control are reversed in RTL languages. If it has icons with text, the icons are placed to the right of the text, and directional icons like arrows or chevrons are flipped horizontally."
|
|
60
57
|
},
|
|
61
58
|
{
|
|
62
59
|
"type": "guideline",
|
|
63
|
-
"content": "
|
|
60
|
+
"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."
|
|
64
61
|
},
|
|
65
62
|
{
|
|
66
63
|
"type": "guideline",
|
|
67
|
-
"content": "
|
|
64
|
+
"content": "Cursor guidelines.\n\nCursor Usage PointerUse the pointer cursor for all interactive components."
|
|
68
65
|
},
|
|
69
66
|
{
|
|
70
67
|
"type": "guideline",
|
|
71
|
-
"content": "
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "guideline",
|
|
75
|
-
"content": "Segmented control groups work best with 2 to 5 items. If your component needs more than 5 items, consider using a dropdown or radio button group instead."
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "guideline",
|
|
79
|
-
"content": "Segmented control groups are meant for switching views on a page. To navigate to a different page or progressively disclose different content, use tabs instead. To perform actions or make a selection, use action groups."
|
|
68
|
+
"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."
|
|
80
69
|
}
|
|
81
70
|
],
|
|
82
71
|
"options": {
|
|
83
72
|
"orientation": {
|
|
84
73
|
"type": "string",
|
|
85
74
|
"default": "horizontal",
|
|
86
|
-
"values": [
|
|
87
|
-
{
|
|
88
|
-
"value": "horizontal"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"value": "vertical"
|
|
92
|
-
}
|
|
93
|
-
]
|
|
75
|
+
"values": [{ "value": "horizontal" }, { "value": "vertical" }]
|
|
94
76
|
},
|
|
95
77
|
"isFluid": {
|
|
96
78
|
"type": "boolean",
|
|
@@ -100,14 +82,7 @@
|
|
|
100
82
|
"alignment": {
|
|
101
83
|
"type": "string",
|
|
102
84
|
"default": "start",
|
|
103
|
-
"values": [
|
|
104
|
-
{
|
|
105
|
-
"value": "start"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"value": "center"
|
|
109
|
-
}
|
|
110
|
-
]
|
|
85
|
+
"values": [{ "value": "start" }, { "value": "center" }]
|
|
111
86
|
},
|
|
112
87
|
"hideTracker": {
|
|
113
88
|
"type": "boolean",
|
|
@@ -121,14 +96,7 @@
|
|
|
121
96
|
"keyboardActivation": {
|
|
122
97
|
"type": "string",
|
|
123
98
|
"default": "manual",
|
|
124
|
-
"values": [
|
|
125
|
-
{
|
|
126
|
-
"value": "manual"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"value": "automatic"
|
|
130
|
-
}
|
|
131
|
-
]
|
|
99
|
+
"values": [{ "value": "manual" }, { "value": "automatic" }]
|
|
132
100
|
},
|
|
133
101
|
"items": {
|
|
134
102
|
"type": "array",
|
|
@@ -161,24 +129,14 @@
|
|
|
161
129
|
}
|
|
162
130
|
}
|
|
163
131
|
},
|
|
164
|
-
"lifecycle": {
|
|
165
|
-
"introduced": "1.0.0-draft"
|
|
166
|
-
},
|
|
132
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
167
133
|
"accessibility": {
|
|
168
134
|
"intents": ["choose"],
|
|
169
135
|
"focusable": true,
|
|
170
136
|
"keyboardIntents": ["navigate-items", "activate"],
|
|
171
137
|
"wcag": [
|
|
172
|
-
{
|
|
173
|
-
|
|
174
|
-
"level": "A",
|
|
175
|
-
"title": "Keyboard"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"criterion": "4.1.2",
|
|
179
|
-
"level": "A",
|
|
180
|
-
"title": "Name, Role, Value"
|
|
181
|
-
}
|
|
138
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
139
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
182
140
|
]
|
|
183
141
|
}
|
|
184
142
|
}
|
|
@@ -16,108 +16,63 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "Minimum and maximum size.\n\nMinimum and maximum sizing ensures that the component remains clear, usable, and visually consistent, even in flexible or responsive layouts."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Consistent sizing.\n\nAll select boxes should be the same size as one another. Keep metadata concise, and make the size of the box large enough to accommodate longer text when translated to other languages."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Text overflow.\n\nWhen the title of the select box is too long for the available horizontal space, it wraps to another line. Wrapped text should not affect the size of an individual select box. Each box in a group should have enough space to allow for longer, localized text to fit as necessary."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"type": "guideline",
|
|
31
|
-
"content": "
|
|
31
|
+
"content": "Selection.\n\nClicking a select box does not immediately move to the next step in the sequence. After making a selection, the user must initiate the next step by choosing a button or similar component outside the select box group."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"type": "guideline",
|
|
35
|
-
"content": "
|
|
35
|
+
"content": "Keyboard focus.\n\nA select box group can be navigated using a keyboard. The keyboard focus state takes the button's visual hover state and adds a blue ring to the button in focus."
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"type": "guideline",
|
|
39
|
-
"content": "
|
|
39
|
+
"content": "Use illustrations only when they have a clear meaning.\n\nIllustrations should be used when they help clarify the content. If the items are too complex to represent visually, it may be better to omit them. For consistency, if one select box includes an illustration, all select boxes in the group should include one."
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"type": "guideline",
|
|
43
|
-
"content": "
|
|
43
|
+
"content": "Keep select box groups to 9 items or less.\n\nSelect box groups work best with 3 to 9 items. If your experience needs more than 9 items, consider using a dropdown, checkboxes, or radio button group instead."
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
"type": "
|
|
47
|
-
"content": "
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
"type": "guideline",
|
|
51
|
-
"content": "When the title of the select box is too long for the available horizontal space, it wraps to another line. Wrapped text should not affect the size of an individual select box. Each box in a group should have enough space to allow for longer, localized text to fit as necessary."
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"type": "guideline",
|
|
55
|
-
"content": "Clicking a select box does not immediately move to the next step in the sequence. After making a selection, the user must initiate the next step by choosing a button or similar component outside the select box group."
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "guideline",
|
|
59
|
-
"content": "A select box group can be navigated using a keyboard. The keyboard focus state takes the button’s visual hover state and adds a blue ring to the button in focus."
|
|
46
|
+
"type": "do-dont",
|
|
47
|
+
"content": "Don't use select boxes as actions",
|
|
48
|
+
"dont": "Select boxes are used to choose an item from a group. If clicking an item is meant to immediately trigger an action, use an action group instead."
|
|
60
49
|
},
|
|
61
50
|
{
|
|
62
51
|
"type": "guideline",
|
|
63
|
-
"content": "
|
|
52
|
+
"content": "Use consistent sizing.\n\nAll select boxes in a group should be the same size to maintain visual consistency and usability."
|
|
64
53
|
},
|
|
65
54
|
{
|
|
66
|
-
"type": "
|
|
67
|
-
"content": "
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
"type": "guideline",
|
|
71
|
-
"content": "Select boxes are used to choose an item from a group. If clicking an item is meant to immediately trigger an action, use an action group instead."
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "guideline",
|
|
75
|
-
"content": "All select boxes in a group should be the same size to maintain visual consistency and usability."
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "guideline",
|
|
79
|
-
"content": "Select boxes use a checkbox to indicate both single- and multi-selection. Don’t use radio buttons for single-selection."
|
|
55
|
+
"type": "do-dont",
|
|
56
|
+
"content": "Don't use radio buttons in select boxes",
|
|
57
|
+
"dont": "Select boxes use a checkbox to indicate both single- and multi-selection. Don't use radio buttons for single-selection."
|
|
80
58
|
},
|
|
81
59
|
{
|
|
82
60
|
"type": "guideline",
|
|
83
|
-
"content": "
|
|
61
|
+
"content": "Checkbox vs. highlight selection.\n\nSome cases may make more sense for the user to select one or a few options in a group of select boxes, but if the use case doesn't make sense to be checking a selection, showCheckbox can be false and the highlight style can be used instead. There is no visual differentiation between single- and multi-select behaviors when checkboxes are not present."
|
|
84
62
|
}
|
|
85
63
|
],
|
|
86
64
|
"options": {
|
|
87
|
-
"label": {
|
|
88
|
-
"type": "string"
|
|
89
|
-
},
|
|
65
|
+
"label": { "type": "string" },
|
|
90
66
|
"orientation": {
|
|
91
67
|
"type": "string",
|
|
92
68
|
"default": "vertical",
|
|
93
|
-
"values": [
|
|
94
|
-
{
|
|
95
|
-
"value": "horizontal"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"value": "vertical"
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
"body": {
|
|
103
|
-
"type": "string"
|
|
104
|
-
},
|
|
105
|
-
"isSelected": {
|
|
106
|
-
"type": "boolean",
|
|
107
|
-
"default": false
|
|
108
|
-
},
|
|
109
|
-
"hideIllustration": {
|
|
110
|
-
"type": "boolean",
|
|
111
|
-
"default": false
|
|
112
|
-
},
|
|
113
|
-
"showCheckbox": {
|
|
114
|
-
"type": "boolean",
|
|
115
|
-
"default": false
|
|
116
|
-
},
|
|
117
|
-
"isDisabled": {
|
|
118
|
-
"type": "boolean",
|
|
119
|
-
"default": false
|
|
69
|
+
"values": [{ "value": "horizontal" }, { "value": "vertical" }]
|
|
120
70
|
},
|
|
71
|
+
"body": { "type": "string" },
|
|
72
|
+
"isSelected": { "type": "boolean", "default": false },
|
|
73
|
+
"hideIllustration": { "type": "boolean", "default": false },
|
|
74
|
+
"showCheckbox": { "type": "boolean", "default": false },
|
|
75
|
+
"isDisabled": { "type": "boolean", "default": false },
|
|
121
76
|
"multiple": {
|
|
122
77
|
"type": "boolean",
|
|
123
78
|
"default": false,
|
|
@@ -125,41 +80,19 @@
|
|
|
125
80
|
}
|
|
126
81
|
},
|
|
127
82
|
"states": [
|
|
128
|
-
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
{
|
|
133
|
-
"name": "hover",
|
|
134
|
-
"trigger": "interaction"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"name": "keyboard-focus",
|
|
138
|
-
"trigger": "interaction"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"name": "selected",
|
|
142
|
-
"trigger": "interaction"
|
|
143
|
-
}
|
|
83
|
+
{ "name": "down", "trigger": "interaction" },
|
|
84
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
85
|
+
{ "name": "keyboard-focus", "trigger": "interaction" },
|
|
86
|
+
{ "name": "selected", "trigger": "interaction" }
|
|
144
87
|
],
|
|
145
|
-
"lifecycle": {
|
|
146
|
-
"introduced": "1.0.0-draft"
|
|
147
|
-
},
|
|
88
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
148
89
|
"accessibility": {
|
|
149
90
|
"intents": ["select"],
|
|
150
91
|
"focusable": true,
|
|
151
92
|
"keyboardIntents": ["activate"],
|
|
152
93
|
"wcag": [
|
|
153
|
-
{
|
|
154
|
-
|
|
155
|
-
"level": "A",
|
|
156
|
-
"title": "Keyboard"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"criterion": "4.1.2",
|
|
160
|
-
"level": "A",
|
|
161
|
-
"title": "Name, Role, Value"
|
|
162
|
-
}
|
|
94
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
95
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
163
96
|
]
|
|
164
97
|
}
|
|
165
98
|
}
|
|
@@ -16,75 +16,61 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"type": "guideline",
|
|
19
|
-
"content": "
|
|
19
|
+
"content": "App frame side navigation.\n\nAt a glance, the app frame side navigation may look similar to the standard side navigation. However, its interaction model introduces key differences. The app frame side navigation includes a collapsible menu that lets users hide or reveal labels. The standard side navigation, on the other hand, is best suited for fixed layouts that support multiple visual styles, such as icon-only, text-only, or mixed. Note that the standard side navigation cannot collapse."
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"type": "guideline",
|
|
23
|
-
"content": "
|
|
23
|
+
"content": "Flexible width.\n\nThe width of the side navigation is flexible, so choose a width that works with the navigation items in your experience. Make the width generous enough so that it doesn't feel too condensed. Doing this will ensure that users won't confuse the side navigation with buttons or other controls."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"type": "guideline",
|
|
27
|
-
"content": "
|
|
27
|
+
"content": "Text overflow.\n\nWhen the navigation item text is too long for the horizontal space available, it wraps to form another line."
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"type": "
|
|
31
|
-
"content": "
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
"type": "guideline",
|
|
35
|
-
"content": "The app frame side navigation includes a collapsible menu that lets users hide or reveal labels."
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"type": "guideline",
|
|
39
|
-
"content": "The standard side navigation, on the other hand, is best suited for fixed layouts that support multiple visual styles, such as icon-only, text-only, or mixed. Note that the standard side navigation cannot collapse."
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "guideline",
|
|
43
|
-
"content": "The width of the side navigation is flexible, so choose a width that works with the navigation items in your experience. Make the width generous enough so that it doesn’t feel too condensed. Doing this will ensure that users won't confuse the side navigation with buttons or other controls."
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"type": "guideline",
|
|
47
|
-
"content": "When the navigation item text is too long for the horizontal space available, it wraps to form another line."
|
|
30
|
+
"type": "do-dont",
|
|
31
|
+
"content": "Don't make the width too condensed",
|
|
32
|
+
"dont": "Make sure the width is generous enough so that it doesn't feel too condensed. This ensures it doesn't get confused with buttons or other controls."
|
|
48
33
|
},
|
|
49
34
|
{
|
|
50
35
|
"type": "guideline",
|
|
51
|
-
"content": "
|
|
36
|
+
"content": "Use descriptive titles.\n\nNavigation should be helpful. Choose titles for navigation items that clearly communicate the places where they'll go. Arbitrary or non-useful titles cause usability issues."
|
|
52
37
|
},
|
|
53
38
|
{
|
|
54
39
|
"type": "guideline",
|
|
55
|
-
"content": "
|
|
40
|
+
"content": "Be concise.\n\nAlong with being descriptive, the labels of navigation items should be succinct. Keep navigation strings to 1 or 2 and no more than 3 concise words (in U.S. English, which is the source locale). Reduce any unnecessary words in order to ensure simplicity. Navigation items should never be so long that they require truncation, except in instances where navigation is user-generated, such as folder and filenames."
|
|
56
41
|
},
|
|
57
42
|
{
|
|
58
43
|
"type": "guideline",
|
|
59
|
-
"content": "
|
|
44
|
+
"content": "Be cautious with line breaks.\n\nWhen possible, the default width should automatically adjust to the longest string in the navigation to accommodate all translations. As a last resort for long strings, specific line breaks can be built into the implementation. These breaks depend on the content and require manual handling by globalization engineers."
|
|
60
45
|
},
|
|
61
46
|
{
|
|
62
47
|
"type": "guideline",
|
|
63
|
-
"content": "
|
|
48
|
+
"content": "Mixed icon usage.\n\nIn multi-level side navigation, icon and text-only styles can be used together. Users may include supporting icons on the first level and omit them on the second and third levels, or choose to use no icons at all. Do not mix icon and no-icon options within the same navigation level."
|
|
64
49
|
},
|
|
65
50
|
{
|
|
66
|
-
"type": "
|
|
67
|
-
"content": "
|
|
51
|
+
"type": "do-dont",
|
|
52
|
+
"content": "Avoid deeply nested menus",
|
|
53
|
+
"dont": "The multi-level side navigation goes to three levels deep. Adding more than three levels will make the indentation indiscernible, which becomes a major usability issue."
|
|
68
54
|
},
|
|
69
55
|
{
|
|
70
56
|
"type": "guideline",
|
|
71
|
-
"content": "
|
|
57
|
+
"content": "Use consistent multi-level behavior.\n\nIf top-level navigation items have a location associated with them, send the user to that location and open the sub-level navigation items. If a top-level navigation item does not have any associated location, only open the sub-level navigation items. Side navigation can use either of these behaviors, but should never mix behaviors in the same experience."
|
|
72
58
|
},
|
|
73
59
|
{
|
|
74
60
|
"type": "guideline",
|
|
75
|
-
"content": "
|
|
61
|
+
"content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the side navigation is mirrored. Navigation items are left-aligned and their icons are placed on the right side of the text."
|
|
76
62
|
},
|
|
77
63
|
{
|
|
78
64
|
"type": "guideline",
|
|
79
|
-
"content": "
|
|
65
|
+
"content": "Keyboard interactions.\n\nKey Interaction TabMoves focus to next item.Shift + TabMoves focus to previous item.Enter or SpaceSelects item, expands and collapses item with children."
|
|
80
66
|
},
|
|
81
67
|
{
|
|
82
68
|
"type": "guideline",
|
|
83
|
-
"content": "
|
|
69
|
+
"content": "Cursor guidelines.\n\nCursor Usage PointerUse the pointer cursor for all interactive components in every state.Grab handUse the grab hand cursor when hovering over a side navigation item that can be moved.Grab fistUse the grabbing hand cursor while dragging a side nav item."
|
|
84
70
|
},
|
|
85
71
|
{
|
|
86
72
|
"type": "guideline",
|
|
87
|
-
"content": "
|
|
73
|
+
"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 side navigations—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, AAASide navigation must be understandable to assistive technologies, such as screen readers. Use proper semantic HTML or the appropriate ARIA roles to ensure accessibility.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 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."
|
|
88
74
|
}
|
|
89
75
|
],
|
|
90
76
|
"options": {
|
|
@@ -127,15 +113,9 @@
|
|
|
127
113
|
"default": "single",
|
|
128
114
|
"description": "How selection is handled for items.",
|
|
129
115
|
"values": [
|
|
130
|
-
{
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
{
|
|
134
|
-
"value": "single"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"value": "multiple"
|
|
138
|
-
}
|
|
116
|
+
{ "value": "none" },
|
|
117
|
+
{ "value": "single" },
|
|
118
|
+
{ "value": "multiple" }
|
|
139
119
|
]
|
|
140
120
|
}
|
|
141
121
|
},
|
|
@@ -144,42 +124,21 @@
|
|
|
144
124
|
"name": "trailing-accessory-area",
|
|
145
125
|
"description": "Trailing area for accessory content such as counts or actions."
|
|
146
126
|
},
|
|
147
|
-
{
|
|
148
|
-
"name": "indicator"
|
|
149
|
-
}
|
|
127
|
+
{ "name": "indicator" }
|
|
150
128
|
],
|
|
151
129
|
"states": [
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"name": "down",
|
|
158
|
-
"trigger": "interaction"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"name": "keyboard-focus",
|
|
162
|
-
"trigger": "interaction"
|
|
163
|
-
}
|
|
130
|
+
{ "name": "hover", "trigger": "interaction" },
|
|
131
|
+
{ "name": "down", "trigger": "interaction" },
|
|
132
|
+
{ "name": "keyboard-focus", "trigger": "interaction" }
|
|
164
133
|
],
|
|
165
|
-
"lifecycle": {
|
|
166
|
-
"introduced": "1.0.0-draft"
|
|
167
|
-
},
|
|
134
|
+
"lifecycle": { "introduced": "1.0.0-draft" },
|
|
168
135
|
"accessibility": {
|
|
169
136
|
"intents": ["navigate"],
|
|
170
137
|
"focusable": true,
|
|
171
138
|
"keyboardIntents": ["navigate-items", "activate"],
|
|
172
139
|
"wcag": [
|
|
173
|
-
{
|
|
174
|
-
|
|
175
|
-
"level": "A",
|
|
176
|
-
"title": "Keyboard"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"criterion": "4.1.2",
|
|
180
|
-
"level": "A",
|
|
181
|
-
"title": "Name, Role, Value"
|
|
182
|
-
}
|
|
140
|
+
{ "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
|
|
141
|
+
{ "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
|
|
183
142
|
]
|
|
184
143
|
}
|
|
185
144
|
}
|