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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/components/accordion.json +15 -54
  2. package/components/action-bar.json +9 -23
  3. package/components/action-button.json +39 -79
  4. package/components/action-group.json +18 -129
  5. package/components/alert-banner.json +8 -27
  6. package/components/alert-dialog.json +34 -48
  7. package/components/avatar-group.json +9 -28
  8. package/components/avatar.json +29 -92
  9. package/components/badge.json +56 -150
  10. package/components/breadcrumbs.json +26 -100
  11. package/components/button-group.json +19 -50
  12. package/components/button.json +61 -92
  13. package/components/calendar.json +8 -67
  14. package/components/cards.json +31 -46
  15. package/components/checkbox-group.json +16 -78
  16. package/components/checkbox.json +27 -90
  17. package/components/close-button.json +20 -62
  18. package/components/coach-indicator.json +14 -44
  19. package/components/coach-mark.json +8 -26
  20. package/components/color-area.json +20 -93
  21. package/components/color-handle.json +25 -38
  22. package/components/color-loupe.json +2 -6
  23. package/components/color-slider.json +26 -122
  24. package/components/color-wheel.json +17 -84
  25. package/components/combo-box.json +50 -182
  26. package/components/contextual-help.json +80 -119
  27. package/components/date-picker.json +24 -120
  28. package/components/divider.json +12 -25
  29. package/components/drop-zone.json +18 -30
  30. package/components/field-label.json +21 -62
  31. package/components/help-text.json +16 -53
  32. package/components/illustrated-message.json +21 -72
  33. package/components/in-line-alert.json +13 -53
  34. package/components/link.json +24 -56
  35. package/components/list-view.json +15 -73
  36. package/components/menu.json +45 -174
  37. package/components/meter.json +24 -65
  38. package/components/number-field.json +34 -168
  39. package/components/picker.json +42 -181
  40. package/components/popover.json +37 -113
  41. package/components/progress-bar.json +23 -95
  42. package/components/progress-circle.json +12 -42
  43. package/components/radio-button.json +14 -67
  44. package/components/radio-group.json +28 -125
  45. package/components/rating.json +9 -38
  46. package/components/search-field.json +34 -119
  47. package/components/segmented-control.json +21 -63
  48. package/components/select-box.json +29 -96
  49. package/components/side-navigation.json +28 -69
  50. package/components/slider.json +39 -148
  51. package/components/standard-dialog.json +16 -88
  52. package/components/status-light.json +41 -123
  53. package/components/steplist.json +5 -24
  54. package/components/swatch-group.json +19 -55
  55. package/components/swatch.json +24 -79
  56. package/components/switch.json +31 -72
  57. package/components/table.json +26 -73
  58. package/components/tabs.json +22 -39
  59. package/components/tag-field.json +14 -60
  60. package/components/tag-group.json +16 -49
  61. package/components/tag.json +21 -71
  62. package/components/takeover-dialog.json +10 -61
  63. package/components/text-area.json +49 -198
  64. package/components/text-field.json +42 -163
  65. package/components/thumbnail.json +22 -63
  66. package/components/toast.json +29 -50
  67. package/components/tooltip.json +27 -74
  68. package/components/tree-view.json +45 -140
  69. package/guidelines/app-frame-overview.json +18 -10
  70. package/guidelines/applying-the-type-system.json +14 -10
  71. package/guidelines/attention-hierarchy.json +3 -3
  72. package/guidelines/background-layers.json +41 -5
  73. package/guidelines/bi-directionality.json +8 -8
  74. package/guidelines/border-width.json +17 -1
  75. package/guidelines/brand.json +6 -6
  76. package/guidelines/colors.json +24 -12
  77. package/guidelines/component-spacing.json +14 -2
  78. package/guidelines/contact-us.json +1 -1
  79. package/guidelines/content-area-browsing-context.json +11 -11
  80. package/guidelines/content-design-grammar-and-mechanics.json +241 -0
  81. package/guidelines/content-design-voice-and-tone.json +37 -0
  82. package/guidelines/content-grammar-and-mechanics.json +252 -0
  83. package/guidelines/content-language-and-inclusivity-writing-about-people.json +103 -0
  84. package/guidelines/content-language-and-inclusivity-writing-with-visuals.json +70 -0
  85. package/guidelines/content-voice-and-tone.json +47 -0
  86. package/guidelines/creating-bluelines-browsing-context.json +9 -9
  87. package/guidelines/design-tokens.json +50 -14
  88. package/guidelines/drop-shadow.json +13 -1
  89. package/guidelines/grays.json +5 -5
  90. package/guidelines/header-browsing-context.json +7 -4
  91. package/guidelines/icon-fundamentals.json +4 -4
  92. package/guidelines/illustration.json +21 -25
  93. package/guidelines/in-product-word-list.json +1 -1
  94. package/guidelines/inclusive-design.json +14 -6
  95. package/guidelines/inclusive-ux-writing.json +1 -1
  96. package/guidelines/internationalization.json +13 -13
  97. package/guidelines/language-and-inclusivity-writing-about-people.json +85 -0
  98. package/guidelines/language-and-inclusivity-writing-with-visuals.json +61 -0
  99. package/guidelines/layout-and-structure-containers.json +7 -7
  100. package/guidelines/layout-and-structure-spacing-overview.json +66 -0
  101. package/guidelines/layout-spacing.json +4 -4
  102. package/guidelines/manifest.json +126 -38
  103. package/guidelines/motion.json +5 -5
  104. package/guidelines/object-styles-overview.json +2 -2
  105. package/guidelines/principles.json +7 -8
  106. package/guidelines/rounding.json +15 -3
  107. package/guidelines/side-navigation-browsing-context.json +16 -13
  108. package/guidelines/spacing-overview.json +7 -7
  109. package/guidelines/states.json +4 -4
  110. package/guidelines/support.json +113 -0
  111. package/guidelines/typography-overview.json +7 -3
  112. package/guidelines/typography-system.json +56 -16
  113. package/guidelines/using-icons.json +14 -14
  114. package/guidelines/visual-language-containers.json +7 -7
  115. package/guidelines/whats-new.json +32 -0
  116. package/guidelines/writing-for-errors.json +21 -21
  117. package/guidelines/writing-for-onboarding.json +17 -17
  118. package/guidelines/writing-for-readability.json +4 -4
  119. package/package.json +1 -1
@@ -16,94 +16,64 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "Tooltips display contextual information related to a specific component. They appear on hover or focus to clarify purpose or behavior."
19
+ "content": "Text overflow.\n\nWhen the label is too long for the available horizontal space, it wraps to form another line."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "All tooltips have a label. The label communicates the contextual help or information about specific components when a user hovers over or focuses on them."
23
+ "content": "Animation.\n\nA tooltip fades in and out when showing and hiding, and slides a short distance from the source to indicate its origin. The direction of the slide (left, right, top, bottom) depends on the placement of the tooltip. The animation attributes (duration, easing, offset) are the same whether it's showing or hiding."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "By default, tooltips are the neutral variant. These are the most common variant because most tooltips are used to only disclose additional information, without conveying a semantic meaning. The neutral variant never includes an icon."
27
+ "content": "Immediate or delayed appearance.\n\nTooltips attached to help icons appear immediately. For conventional UI elements where a tooltip appearing immediately would be intrusive, delay appearance with a warmup period."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "Tooltips also come in semantic variants: informative (blue), and negative (red). An icon is required for these variants to ensure information isn’t conveyed by color alone."
31
+ "content": "Warmup and cooldown.\n\nThe warmup period is a global timer that requires the cursor to remain on a UI element for the allotted time before a tooltip appears. Once this period is complete, a tooltip appears instantly on any hovered-upon UI element until the cursor is in an area that does not trigger a tooltip for the duration of the cooldown period."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "2 of the 3 tooltip variants (informative and negative) can include an icon to supplement the messaging. These icons are predefined and can not be customized. Unless it's being used to provide context about the exact same icon, a semantic tooltip should always show an icon. Doing this is essential for helping users with color vision deficiency to discern the message tone."
35
+ "content": "Use tooltips to describe icons.\n\nIcons are not always easy to identify on their own. When you use components that don't have labels — for example, icon-only action buttons and tabs — make sure to use tooltips to provide context for the icons."
36
36
  },
37
37
  {
38
- "type": "guideline",
39
- "content": "A tooltip is positioned in relation to its target."
40
- },
41
- {
42
- "type": "guideline",
43
- "content": "This option determines whether or not a tooltip should be able to switch sides when constrained by space. A tooltip placed at the top would flip to be placed at the bottom (and vice versa), and a tooltip placed at the left would flip to be placed at the right (and vice versa)."
44
- },
45
- {
46
- "type": "guideline",
47
- "content": "The offset is the distance between the end of the tip and the target."
48
- },
49
- {
50
- "type": "guideline",
51
- "content": "To make sure that the tooltip will stay within certain boundaries (e.g., a browser window) it’s possible to define a container and a container padding value to respect."
52
- },
53
- {
54
- "type": "guideline",
55
- "content": "When the label is too long for the available horizontal space, it wraps to form another line."
38
+ "type": "do-dont",
39
+ "content": "Don't use tooltips to communicate crucial information",
40
+ "dont": "Show crucial information at all times, not just when a tooltip is displayed. A tooltip should only be used to provide supplementary context or hints to the message shown in help text. For example, in a scenario where a user is entering their password into a field, the crucial information would be to state the password requirements. Supplementary context would be a message about how to get help if they have forgotten their password."
56
41
  },
57
42
  {
58
43
  "type": "guideline",
59
- "content": "A tooltip fades in and out when showing and hiding, and slides a short distance from the source to indicate its origin. The direction of the slide (left, right, top, bottom) depends on the placement of the tooltip. The animation attributes (duration, easing, offset) are the same whether it’s showing or hiding."
44
+ "content": "Be concise.\n\nTooltips should be as concise and clear as possible. Keep the text to 1 or 2 short sentences. If the information you need to communicate is longer than that, look into using a different design. If a tooltip is written in a full sentence (or is 2 or more sentences), include a period at the end. If it's a short phrase or is only the name of a tool, action, or icon, don't add a period to the end."
60
45
  },
61
46
  {
62
- "type": "guideline",
63
- "content": "Tooltips attached to help icons appear immediately. For conventional UI elements where a tooltip appearing immediately would be intrusive, delay appearance with a warmup period."
64
- },
65
- {
66
- "type": "guideline",
67
- "content": "The warmup period is a global timer that requires the cursor to remain on a UI element for the allotted time before a tooltip appears. Once this period is complete, a tooltip appears instantly on any hovered-upon UI element until the cursor is in an area that does not trigger a tooltip for the duration of the cooldown period."
68
- },
69
- {
70
- "type": "guideline",
71
- "content": "Icons are not always easy to identify on their own. When you use components that don’t have labels — for example, icon-only action buttons and tabs — make sure to use tooltips to provide context for the icons."
47
+ "type": "do-dont",
48
+ "content": "Don't place actions inside a tooltip",
49
+ "dont": "Tooltips appear only on hover or when in keyboard focus. They should not contain actions or links."
72
50
  },
73
51
  {
74
52
  "type": "guideline",
75
- "content": "For example, in a scenario where a user is entering their password into a field, the crucial information would be to state the password requirements. Supplementary context would be a message about how to get help if they have forgotten their password."
53
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the tooltip is mirrored. The icon is placed on the right side of the text."
76
54
  },
77
55
  {
78
56
  "type": "guideline",
79
- "content": "Tooltips should be as concise and clear as possible. Keep the text to 1 or 2 short sentences. If the information you need to communicate is longer than that, look into using a different design."
57
+ "content": "Keyboard interactions.\n\nKey Interaction TabTabbing into an item that has a tooltip associated with it (e.g., an icon) shows the tooltip.EscHides the tooltip."
80
58
  },
81
59
  {
82
60
  "type": "guideline",
83
- "content": "If a tooltip is written in a full sentence (or is 2 or more sentences), include a period at the end. If it's a short phrase or is only the name of a tool, action, or icon, don't add a period to the end."
61
+ "content": "Cursor guidelines.\n\nCursor Usage PointerIf the trigger is a button or link, or a focus-only element (like an info icon that shows a tooltip on hover), use the pointer cursor.Default (Arrow)If the trigger is an icon that is not clickable, use the default cursor.PointerIf the tooltip has a link, use the pointer cursor when interacting with the link."
84
62
  },
85
63
  {
86
64
  "type": "guideline",
87
- "content": "Tooltips appear only on hover or when in keyboard focus. They should not contain actions or links."
65
+ "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 content1.1.1ANon‑text elements—such as icons used in tooltips and icons that trigger tooltips—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 purpose1.3.1, 1.3.6A, AAATooltips should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role should be utilized.Use of color1.4.1AColor is never used as the sole way to convey meaning in tooltips. Tooltips use color to reinforce their meaning, but every tooltip also includes a clear text label that communicates purpose.Text contrast minimums1.4.3AALarge 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 text1.4.4AATooltips should be built in such a way that they can be resized without assistive technology up to 200%.Visual presentation1.4.8AAAThe width of text blocks is no more than 80 characters (40 for CJK languages), and text is never justified.Non-text contrast1.4.11AAThe visual presentation of icons and various states have a contrast ratio of at least 3:1.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.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
66
  }
89
67
  ],
90
68
  "options": {
91
- "label": {
92
- "type": "string"
93
- },
69
+ "label": { "type": "string" },
94
70
  "variant": {
95
71
  "type": "string",
96
72
  "default": "neutral",
97
73
  "values": [
98
- {
99
- "value": "neutral"
100
- },
101
- {
102
- "value": "informative"
103
- },
104
- {
105
- "value": "negative"
106
- }
74
+ { "value": "neutral" },
75
+ { "value": "informative" },
76
+ { "value": "negative" }
107
77
  ]
108
78
  },
109
79
  "hasIcon": {
@@ -120,24 +90,13 @@
120
90
  "type": "string",
121
91
  "default": "top",
122
92
  "values": [
123
- {
124
- "value": "top"
125
- },
126
- {
127
- "value": "bottom"
128
- },
129
- {
130
- "value": "left"
131
- },
132
- {
133
- "value": "right"
134
- }
93
+ { "value": "top" },
94
+ { "value": "bottom" },
95
+ { "value": "left" },
96
+ { "value": "right" }
135
97
  ]
136
98
  },
137
- "shouldFlip": {
138
- "type": "boolean",
139
- "default": false
140
- },
99
+ "shouldFlip": { "type": "boolean", "default": false },
141
100
  "offset": {
142
101
  "type": "number",
143
102
  "default": 4,
@@ -149,9 +108,7 @@
149
108
  "description": "units: pixels"
150
109
  }
151
110
  },
152
- "lifecycle": {
153
- "introduced": "1.0.0-draft"
154
- },
111
+ "lifecycle": { "introduced": "1.0.0-draft" },
155
112
  "accessibility": {
156
113
  "role": "tooltip",
157
114
  "focusable": false,
@@ -161,11 +118,7 @@
161
118
  "level": "AA",
162
119
  "title": "Content on Hover or Focus"
163
120
  },
164
- {
165
- "criterion": "4.1.2",
166
- "level": "A",
167
- "title": "Name, Role, Value"
168
- }
121
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
169
122
  ]
170
123
  }
171
124
  }
@@ -16,123 +16,99 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "Tree views display nested, hierarchical content in a collapsible structure. They allow for navigation through multiple levels of grouped information."
19
+ "content": "Collapse and expand.\n\nClicking the collapse and expand button will expand or collapse a tree view item that contains child tree view items."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "A tree view offers four sizes: small, medium, large and extra-large. Medium is the default and most common. Use other sizes sparingly to create a visual hierarchy of importance on the page."
23
+ "content": "Drag and drop.\n\nTree view items can be dragged and dropped to reorder or restructure the hierarchy, including multiple items at once. Dropping items from different hierarchies into a new location flattens them as sibling children. Tree views should also accept external drops, such as files, to create new items. Drag icon focus: When this option is enabled, the drag icon receives keyboard focus to support keyboard-based drag-and-drop."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
27
- "content": "When placed outside a panel, a tree view uses the detached style with rounded corners. Inside a panel, it spans edge to edge by default and does not include rounded corners."
27
+ "content": "Text overflow.\n\nWhen a tree view item label is too long for the available horizontal space, it truncates. The full label appears in a tooltip on hover or keyboard focus."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
31
- "content": "Tree view items can include a drag icon when needed. The icon serves as a keyboard-navigable indicator for items that support multiple actions. It appears only on hover, active and keyboard focus states."
31
+ "content": "Always display the collapse and expand button.\n\nFor proper functionality, a parent-level tree view must include a collapse-and-expand button that uses a chevron icon - regardless of its nesting level. This makes the expected behavior clear when users click an item icon."
32
32
  },
33
33
  {
34
34
  "type": "guideline",
35
- "content": "The type of selection allowed in a collection can be none, single or multiple."
35
+ "content": "Using multiple sources in one tree view.\n\nWhen displaying hierarchical information from different sources, use a single tree view with separate sections and headings. Do not cross-reference sources to avoid confusing users. Single and multi-selection should work as expected within one tree view component."
36
36
  },
37
37
  {
38
38
  "type": "guideline",
39
- "content": "Checkbox With checkboxes, both single-select and multi-select views display boxes on the left of each item. Clicking another item adds it to the selection, and clicking a selected item removes it."
39
+ "content": "Customize the root item display.\n\nThe root (topmost) level of the hierarchy does not always need to be shown or displayed as a tree view item. If the root provides no useful context, hide it or replace it with a section header. In cases such as mixed tree views, the root can serve as a \"Back\" button."
40
40
  },
41
41
  {
42
42
  "type": "guideline",
43
- "content": "Highlight Use highlight selection when checkboxes add clutter or unnecessary controls. This style shows a highlighted state for selected items, and clicking a new item replaces the previous selection by default."
43
+ "content": "Drill-in tree views.\n\nIn some cases, users may need to view different hierarchies depending on context. To support this, let users drill into a tree view item to display a different variation of the tree view within the same panel. Use a navigation controller with a \"Back\" button to let users return to the previous view."
44
44
  },
45
45
  {
46
46
  "type": "guideline",
47
- "content": "All tree views have a hover state, regardless of whether actions or selections can be made."
47
+ "content": "Iconography.\n\nChoose icons that match the object type represented in the tree view. Icons can be unique to specific data types to help clarify meaning for users."
48
48
  },
49
49
  {
50
50
  "type": "guideline",
51
- "content": "Tree views support both single-select and multi-select modes, using either checkbox or highlight styles. In multi-select mode, selecting an item toggles its selection on or off. In single-select mode, selecting an item replaces the current selection."
51
+ "content": "Using thumbnails.\n\nTree view items can display thumbnails instead of icons when users need a content preview. Use icons as a fallback when an image is unavailable, and size them to match the thumbnail. Thumbnails should scale appropriately to the tree view size. For example, an extra-large tree view should not use small thumbnails; in that case, icons may work better. Multiple thumbnails may be displayed in line with a tree view item (for example, layer masks). Each thumbnail should be individually selectable and support standard tree view behaviors, including drag-and-drop. Do not use more than three thumbnails per item."
52
52
  },
53
53
  {
54
54
  "type": "guideline",
55
- "content": "Clicking the collapse and expand button will expand or collapse a tree view item that contains child tree view items."
55
+ "content": "Restrict hierarchy depth.\n\nOne way to manage overflow is to limit how many levels of hierarchy users can create in a tree view. Some products use this approach to reduce the complexity of deeply nested hierarchies. Setting limits helps when a complex hierarchy is unnecessary for the experience."
56
56
  },
57
57
  {
58
58
  "type": "guideline",
59
- "content": "Tree view items can be dragged and dropped to reorder or restructure the hierarchy, including multiple items at once. Dropping items from different hierarchies into a new location flattens them as sibling children. Tree views should also accept external drops, such as files, to create new items."
59
+ "content": "Show truncated labels in tooltip.\n\nWhen a label is too long to fit in the tree view, it truncates with an ellipsis. Hovering over or focusing on the item reveals a tooltip with the full label text."
60
60
  },
61
61
  {
62
62
  "type": "guideline",
63
- "content": "When a tree view item label is too long for the available horizontal space, it truncates. The full label appears in a tooltip on hover or keyboard focus."
63
+ "content": "Use an adjustable layout.\n\nWhen a tree view hierarchy may extend beyond the available layout space, use an adjustable layout mechanism such as panels or rails. This lets users modify the layout while preserving visibility of the tree view."
64
64
  },
65
65
  {
66
66
  "type": "guideline",
67
- "content": "For proper functionality, a parent-level tree view must include a collapse-and-expand button that uses a chevron icon - regardless of its nesting level. This makes the expected behavior clear when users click an item icon."
67
+ "content": "Horizontal scrolling.\n\nIf you have a layout that doesn't allow for users to adjust the width of the container for a tree view, allow them to horizontally scroll in order to see the full depth of the hierarchy."
68
68
  },
69
69
  {
70
70
  "type": "guideline",
71
- "content": "When displaying hierarchical information from different sources, use a single tree view with separate sections and headings. Do not cross-reference sources to avoid confusing users. Single and multi-selection should work as expected within one tree view component."
71
+ "content": "Large tree views.\n\nWhen tree views are very large, use a progress circle or a \"Show more\" control to reveal additional parts when contextually relevant. These loading patterns can apply to the entire tree view or to nested items."
72
72
  },
73
73
  {
74
74
  "type": "guideline",
75
- "content": "The root (topmost) level of the hierarchy does not always need to be shown or displayed as a tree view item. If the root provides no useful context, hide it or replace it with a section header. In cases such as mixed tree views, the root can serve as a “Back” button."
75
+ "content": "Loading tree view items.\n\nIf system processes are delaying the display of child tree view items when a parent tree view item is expanded, show a clear indication that the items are in the process of loading."
76
76
  },
77
77
  {
78
78
  "type": "guideline",
79
- "content": "In some cases, users may need to view different hierarchies depending on context. To support this, let users drill into a tree view item to display a different variation of the tree view within the same panel. Use a navigation controller with a “Back” button to let users return to the previous view."
79
+ "content": "Sorting.\n\nUsers should be able to sort a tree view. Sorting should not affect the hierarchical structure since each layer of the hierarchy is sorted individually."
80
80
  },
81
81
  {
82
82
  "type": "guideline",
83
- "content": "Choose icons that match the object type represented in the tree view. Icons can be unique to specific data types to help clarify meaning for users."
83
+ "content": "Modifying the tree view.\n\nUsers may need to modify a tree view directly. They should be able to create new parent or child items, such as groups or folders, and flatten the hierarchy at the item level, such as ungrouping layers. In some cases, users should be able to edit item labels directly. Any action for modifying the hierarchy should be offered as an explicit control and, if needed, as a keyboard shortcut — but never as a shortcut alone."
84
84
  },
85
85
  {
86
86
  "type": "guideline",
87
- "content": "Tree view items can display thumbnails instead of icons when users need a content preview. Use icons as a fallback when an image is unavailable, and size them to match the thumbnail. Thumbnails should scale appropriately to the tree view size. For example, an extra-large tree view should not use small thumbnails; in that case, icons may work better."
87
+ "content": "Entering into multiple selection mode.\n\nAllow users to enter multiple-selection mode explicitly when keyboard shortcuts such as Shift + click are unavailable or when you need to show a different selection type. Do this by toggling the selection style from highlight to checkbox."
88
88
  },
89
89
  {
90
90
  "type": "guideline",
91
- "content": "One way to manage overflow is to limit how many levels of hierarchy users can create in a tree view. Some products use this approach to reduce the complexity of deeply nested hierarchies. Setting limits helps when a complex hierarchy is unnecessary for the experience."
91
+ "content": "Use checkbox selection for modifying a tree view.\n\nThe checkbox selection style is intended for performing bulk actions on tree view items. Use this option when selection corresponds to bulk actions."
92
92
  },
93
93
  {
94
94
  "type": "guideline",
95
- "content": "When a label is too long to fit in the tree view, it truncates with an ellipsis. Hovering over or focusing on the item reveals a tooltip with the full label text."
95
+ "content": "Use a checkbox component when selection doesn't affect tree view items.\n\nWhen you need to provide selection controls within a hierarchy, use a checkbox component instead of the tree view item's label. This should not correspond to selecting specific content and works best for cases like categorized filtering."
96
96
  },
97
97
  {
98
98
  "type": "guideline",
99
- "content": "When a tree view hierarchy may extend beyond the available layout space, use an adjustable layout mechanism such as panels or rails. This lets users modify the layout while preserving visibility of the tree view."
99
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the entire tree view is mirrored horizontally, including the direction of the collapse and expand button. Workflow icons follow iconography internationalization guidelines."
100
100
  },
101
101
  {
102
102
  "type": "guideline",
103
- "content": "If you have a layout that doesn't allow for users to adjust the width of the container for a tree view, allow them to horizontally scroll in order to see the full depth of the hierarchy."
103
+ "content": "Keyboard interactions.\n\nKey Interaction TabMoves focus to the tree view, placing the first tree view item in focus.Shift + TabMoves focus out of the tree view to the previous focusable element.Down ArrowMoves focus to the tree view item below or to the next thumbnail of a tree view item.Up ArrowMoves focus to the tree view item above or to the previous thumbnail of a tree view item.Enter or SpaceSelects the currently focused tree view item. If focus is on a child of the tree view item, subsequent action is based on the child component’s keyboard interactions. For the drag icon, this places the user in drag-and-drop mode.Right Arrow (Left Arrow in RTL)Expands the currently focused tree view item. If the tree view item is already expanded, or if the tree view item is not expandable, focus is moved in a left-to-right direction along child components. If focus is on the rightmost child of the tree view item, focus does not move.Left Arrow (Right Arrow in RTL)Collapses the currently focused tree view item. If focus is on a child of the tree view item, focus is moved in a right-to-left direction along child components. If focus is on the leftmost child of the tree view item, focus is placed back on the parent tree view item.HomeMoves focus to the first item in the tree view without opening or closing a level.EndMoves focus to the last item in the tree view that is focusable without opening a level.Cmd + [ (optional)Moves the currently selected item up in the view order.Cmd + ] (optional)Moves the currently selected item down in the view order.Cmd + Z (optional)Undoes the action most recently taken, such as after the user drags and drops, reorders, or performs an action on a tree view item.Cmd + G (optional)Groups the selected tree view item(s) into a new parent tree view item.Shift + Cmd + G (optional)Ungroups or removes the selected parent tree view item, placing its children at the same level of hierarchy as the removed items.Printable charactersTypeahead: moves focus to next node matching typed text.* (optional)Expands all sibling nodes at the same level."
104
104
  },
105
105
  {
106
106
  "type": "guideline",
107
- "content": "When tree views are very large, use a progress circle or a “Show more” control to reveal additional parts when contextually relevant. These loading patterns can apply to the entire tree view or to nested items."
107
+ "content": "Cursor guidelines.\n\nCursor Description Default (Arrow)Use the default arrow cursor for non-interactive headers and disabled text.PointerUse the pointer cursor for all interactive pieces of the tree view component.Grab handUse the grab hand on the drag handle when tree view objects can be moved.Grab fistUse the grab fist cursor when actively dragging tree items."
108
108
  },
109
109
  {
110
110
  "type": "guideline",
111
- "content": "If system processes are delaying the display of child tree view items when a parent tree view item is expanded, show a clear indication that the items are in the process of loading."
112
- },
113
- {
114
- "type": "guideline",
115
- "content": "Users should be able to sort a tree view. Sorting should not affect the hierarchical structure since each layer of the hierarchy is sorted individually."
116
- },
117
- {
118
- "type": "guideline",
119
- "content": "Users may need to modify a tree view directly. They should be able to create new parent or child items, such as groups or folders, and flatten the hierarchy at the item level, such as ungrouping layers. In some cases, users should be able to edit item labels directly."
120
- },
121
- {
122
- "type": "guideline",
123
- "content": "Any action for modifying the hierarchy should be offered as an explicit control and, if needed, as a keyboard shortcut — but never as a shortcut alone."
124
- },
125
- {
126
- "type": "guideline",
127
- "content": "Allow users to enter multiple-selection mode explicitly when keyboard shortcuts such as Shift + click are unavailable or when you need to show a different selection type. Do this by toggling the selection style from highlight to checkbox."
128
- },
129
- {
130
- "type": "guideline",
131
- "content": "The checkbox selection style is intended for performing bulk actions on tree view items. Use this option when selection corresponds to bulk actions."
132
- },
133
- {
134
- "type": "guideline",
135
- "content": "When you need to provide selection controls within a hierarchy, use a checkbox component instead of the tree view item’s label. This should not correspond to selecting specific content and works best for cases like categorized filtering."
111
+ "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 tree view items, must provide a text alternative that communicates the item's purpose. All tree items, especially icon-only items, need an accessible name (for example, via a title, aria-label, or associated text) so screen readers can announce their function.Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAATree views should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role should be utilized, including parent/child relationships, expanded/collapsed states, and selection states.Use of color 1.4.1 AColor is not used as a means to convey information or distinguish elements.Contrast 1.4.3 AAThe visual presentation of text has a contrast ratio of at least 4.5:1.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 component states have a contrast ratio of at least 3:1.Text spacing 1.4.12 AALine height of text is at least 1.5x the font size. 2. Operable RequirementCriterionLevel Compliance Keyboard 2.1.1, 2.1.3 A, AAAAll functionality of the component is operable through a keyboard without specific timing for keystrokes.Keyboard traps 2.1.2 AFocus can be moved away from the component using only a keyboard.Seizures and physical reactions 2.3.1, 2.3.2, 2.3.3 A, AAA, AAAThere is no flashing content or unnecessary motion or animation in this component.Focus order 2.4.3 ANavigation sequences receive focus in an order that preserves meaning and operability.Focus visible 2.4.7 AAKeyboard states use an indicator that is visible with at least 3:1 contrast."
136
112
  }
137
113
  ],
138
114
  "options": {
@@ -140,67 +116,29 @@
140
116
  "type": "string",
141
117
  "default": "m",
142
118
  "values": [
143
- {
144
- "value": "s"
145
- },
146
- {
147
- "value": "m"
148
- },
149
- {
150
- "value": "l"
151
- },
152
- {
153
- "value": "xl"
154
- }
119
+ { "value": "s" },
120
+ { "value": "m" },
121
+ { "value": "l" },
122
+ { "value": "xl" }
155
123
  ]
156
124
  },
157
- "isDetached": {
158
- "type": "boolean",
159
- "default": false
160
- },
161
- "isEmphasized": {
162
- "type": "boolean",
163
- "default": false
164
- },
165
- "showDragIcon": {
166
- "type": "boolean",
167
- "default": false
168
- },
125
+ "isDetached": { "type": "boolean", "default": false },
126
+ "isEmphasized": { "type": "boolean", "default": false },
127
+ "showDragIcon": { "type": "boolean", "default": false },
169
128
  "selectionMode": {
170
129
  "type": "string",
171
130
  "default": "multiple",
172
- "values": [
173
- {
174
- "value": "single"
175
- },
176
- {
177
- "value": "multiple"
178
- }
179
- ]
131
+ "values": [{ "value": "single" }, { "value": "multiple" }]
180
132
  },
181
133
  "selectionStyle": {
182
134
  "type": "string",
183
135
  "default": "checkbox",
184
- "values": [
185
- {
186
- "value": "checkbox"
187
- },
188
- {
189
- "value": "highlight"
190
- }
191
- ]
136
+ "values": [{ "value": "checkbox" }, { "value": "highlight" }]
192
137
  },
193
138
  "selectionBehavior": {
194
139
  "type": "string",
195
140
  "default": "toggle",
196
- "values": [
197
- {
198
- "value": "toggle"
199
- },
200
- {
201
- "value": "replace"
202
- }
203
- ]
141
+ "values": [{ "value": "toggle" }, { "value": "replace" }]
204
142
  }
205
143
  },
206
144
  "anatomy": [
@@ -208,63 +146,30 @@
208
146
  "name": "action-area",
209
147
  "description": "Trailing area containing item actions."
210
148
  },
211
- {
212
- "name": "row"
213
- },
149
+ { "name": "row" },
214
150
  {
215
151
  "name": "disclosure-indicator",
216
152
  "description": "Visual affordance showing a tree view item's expand/collapse state."
217
153
  }
218
154
  ],
219
155
  "states": [
220
- {
221
- "name": "default",
222
- "description": "Resting base state."
223
- },
224
- {
225
- "name": "hover",
226
- "trigger": "interaction"
227
- },
228
- {
229
- "name": "down",
230
- "trigger": "interaction"
231
- },
232
- {
233
- "name": "keyboard-focus",
234
- "trigger": "interaction"
235
- },
236
- {
237
- "name": "selected",
238
- "trigger": "interaction"
239
- },
240
- {
241
- "name": "selected-default",
242
- "trigger": "interaction"
243
- },
244
- {
245
- "name": "selected-hover",
246
- "trigger": "interaction"
247
- }
156
+ { "name": "default", "description": "Resting base state." },
157
+ { "name": "hover", "trigger": "interaction" },
158
+ { "name": "down", "trigger": "interaction" },
159
+ { "name": "keyboard-focus", "trigger": "interaction" },
160
+ { "name": "selected", "trigger": "interaction" },
161
+ { "name": "selected-default", "trigger": "interaction" },
162
+ { "name": "selected-hover", "trigger": "interaction" }
248
163
  ],
249
- "lifecycle": {
250
- "introduced": "1.0.0-draft"
251
- },
164
+ "lifecycle": { "introduced": "1.0.0-draft" },
252
165
  "accessibility": {
253
166
  "role": "tree",
254
167
  "intents": ["navigate", "select", "expand"],
255
168
  "focusable": true,
256
169
  "keyboardIntents": ["navigate-items", "expand", "collapse", "activate"],
257
170
  "wcag": [
258
- {
259
- "criterion": "2.1.1",
260
- "level": "A",
261
- "title": "Keyboard"
262
- },
263
- {
264
- "criterion": "4.1.2",
265
- "level": "A",
266
- "title": "Name, Role, Value"
267
- }
171
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
172
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
268
173
  ]
269
174
  }
270
175
  }