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

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 (136) hide show
  1. package/components/accordion.json +67 -15
  2. package/components/action-bar.json +30 -9
  3. package/components/action-button.json +92 -39
  4. package/components/action-group.json +137 -18
  5. package/components/alert-banner.json +27 -8
  6. package/components/alert-dialog.json +55 -34
  7. package/components/avatar-group.json +35 -9
  8. package/components/avatar.json +105 -29
  9. package/components/badge.json +163 -56
  10. package/components/breadcrumbs.json +107 -26
  11. package/components/button-group.json +63 -19
  12. package/components/button.json +105 -61
  13. package/components/calendar.json +74 -8
  14. package/components/card.json +13 -0
  15. package/components/cards.json +46 -31
  16. package/components/checkbox-group.json +85 -16
  17. package/components/checkbox.json +97 -27
  18. package/components/close-button.json +75 -20
  19. package/components/coach-indicator.json +44 -14
  20. package/components/coach-mark.json +26 -8
  21. package/components/color-area.json +100 -20
  22. package/components/color-handle.json +46 -25
  23. package/components/color-loupe.json +14 -2
  24. package/components/color-slider.json +129 -26
  25. package/components/color-wheel.json +91 -17
  26. package/components/combo-box.json +189 -50
  27. package/components/contextual-help.json +126 -80
  28. package/components/date-field.json +7 -0
  29. package/components/date-picker.json +127 -24
  30. package/components/divider.json +38 -12
  31. package/components/drop-zone.json +37 -18
  32. package/components/field-label.json +62 -21
  33. package/components/heading.json +7 -0
  34. package/components/help-text.json +53 -16
  35. package/components/illustrated-message.json +85 -21
  36. package/components/in-line-alert.json +53 -13
  37. package/components/link.json +63 -24
  38. package/components/list-view.json +80 -15
  39. package/components/menu.json +181 -45
  40. package/components/meter.json +78 -24
  41. package/components/number-field.json +175 -34
  42. package/components/picker.json +188 -42
  43. package/components/popover.json +126 -37
  44. package/components/progress-bar.json +108 -23
  45. package/components/progress-circle.json +55 -12
  46. package/components/radio-button.json +67 -14
  47. package/components/radio-group.json +132 -28
  48. package/components/rating.json +38 -9
  49. package/components/search-field.json +126 -34
  50. package/components/segmented-control.json +70 -21
  51. package/components/select-box.json +103 -29
  52. package/components/side-navigation.json +69 -28
  53. package/components/slider.json +155 -39
  54. package/components/standard-dialog.json +88 -16
  55. package/components/status-light.json +136 -41
  56. package/components/steplist.json +24 -5
  57. package/components/swatch-group.json +55 -19
  58. package/components/swatch.json +79 -24
  59. package/components/switch.json +79 -31
  60. package/components/table.json +73 -26
  61. package/components/tabs.json +52 -22
  62. package/components/tag-field.json +60 -14
  63. package/components/tag-group.json +56 -16
  64. package/components/tag.json +78 -21
  65. package/components/takeover-dialog.json +61 -10
  66. package/components/text-area.json +205 -49
  67. package/components/text-field.json +170 -42
  68. package/components/thumbnail.json +63 -22
  69. package/components/time-field.json +7 -0
  70. package/components/toast.json +50 -29
  71. package/components/tooltip.json +87 -27
  72. package/components/tree-view.json +147 -45
  73. package/components/user-card.json +7 -0
  74. package/guidelines/app-frame-overview.json +44 -46
  75. package/guidelines/attention-hierarchy.json +22 -13
  76. package/guidelines/background-layers.json +10 -80
  77. package/guidelines/brand.json +12 -32
  78. package/guidelines/colors.json +17 -47
  79. package/guidelines/developer-overview.json +9 -25
  80. package/guidelines/faqs.json +9 -96
  81. package/guidelines/fonts.json +14 -29
  82. package/guidelines/grays.json +44 -17
  83. package/guidelines/icon-fundamentals.json +18 -7
  84. package/guidelines/manifest.json +15 -367
  85. package/guidelines/motion.json +16 -17
  86. package/guidelines/principles.json +8 -7
  87. package/guidelines/resources.json +15 -21
  88. package/guidelines/states.json +11 -16
  89. package/guidelines/using-icons.json +44 -33
  90. package/package.json +2 -2
  91. package/registry/platform-implementations.json +30 -0
  92. package/guidelines/ai-resource-guide.json +0 -50
  93. package/guidelines/applying-the-type-system.json +0 -67
  94. package/guidelines/bi-directionality.json +0 -57
  95. package/guidelines/border-width.json +0 -58
  96. package/guidelines/cognitive.json +0 -197
  97. package/guidelines/component-spacing.json +0 -61
  98. package/guidelines/contact-us.json +0 -67
  99. package/guidelines/content-area-browsing-context.json +0 -65
  100. package/guidelines/content-design-grammar-and-mechanics.json +0 -241
  101. package/guidelines/content-design-voice-and-tone.json +0 -37
  102. package/guidelines/content-grammar-and-mechanics.json +0 -252
  103. package/guidelines/content-language-and-inclusivity-writing-about-people.json +0 -103
  104. package/guidelines/content-language-and-inclusivity-writing-with-visuals.json +0 -70
  105. package/guidelines/content-voice-and-tone.json +0 -47
  106. package/guidelines/creating-bluelines-browsing-context.json +0 -91
  107. package/guidelines/design-tokens.json +0 -158
  108. package/guidelines/drop-shadow.json +0 -68
  109. package/guidelines/grammar-and-mechanics.json +0 -252
  110. package/guidelines/header-browsing-context.json +0 -40
  111. package/guidelines/illustration.json +0 -105
  112. package/guidelines/in-product-word-list.json +0 -29
  113. package/guidelines/inclusive-design.json +0 -101
  114. package/guidelines/inclusive-ux-writing.json +0 -30
  115. package/guidelines/internationalization.json +0 -87
  116. package/guidelines/language-and-inclusivity-writing-about-people.json +0 -85
  117. package/guidelines/language-and-inclusivity-writing-with-visuals.json +0 -61
  118. package/guidelines/layout-and-structure-containers.json +0 -47
  119. package/guidelines/layout-and-structure-spacing-overview.json +0 -66
  120. package/guidelines/layout-spacing.json +0 -39
  121. package/guidelines/object-styles-overview.json +0 -17
  122. package/guidelines/rounding.json +0 -73
  123. package/guidelines/side-navigation-browsing-context.json +0 -74
  124. package/guidelines/spacing-overview.json +0 -45
  125. package/guidelines/support.json +0 -113
  126. package/guidelines/typography-overview.json +0 -43
  127. package/guidelines/typography-system.json +0 -208
  128. package/guidelines/visual-language-containers.json +0 -36
  129. package/guidelines/voice-and-tone.json +0 -47
  130. package/guidelines/whats-new.json +0 -32
  131. package/guidelines/writing-about-people.json +0 -103
  132. package/guidelines/writing-for-errors.json +0 -120
  133. package/guidelines/writing-for-onboarding.json +0 -119
  134. package/guidelines/writing-for-readability.json +0 -54
  135. package/guidelines/writing-with-visuals.json +0 -70
  136. package/registry/platform-extensions/web-components-states.json +0 -58
@@ -16,100 +16,121 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
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."
19
+ "content": "Toasts display brief, temporary notifications. They appear briefly without blocking interaction and typically do not require user action."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
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."
23
+ "content": "Toasts must include text to communicate a message. Write the text as concisely as possible while still being clear about what has happened or is happening."
24
24
  },
25
25
  {
26
26
  "type": "guideline",
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."
27
+ "content": "The neutral toast is the default variant. It is gray and does not have an icon. This is used when the message is neutral in tone or when its semantics do not fit in any of the other variants."
28
28
  },
29
29
  {
30
30
  "type": "guideline",
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."
31
+ "content": "The informative toast uses the informative semantic color (blue) and has an info icon to help those with color vision deficiency discern the message tone. This should be used when the message should call extra attention compared to the neutral variant."
32
32
  },
33
33
  {
34
- "type": "do-dont",
35
- "content": "Don't display more than one action",
36
- "dont": "Actionable toasts should only have one button."
34
+ "type": "guideline",
35
+ "content": "The positive toast uses the positive semantic color (green) and has a checkmark icon to help those with color vision deficiency discern the message tone. This is used to inform about a successful action or completion of a task."
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."
37
40
  },
38
41
  {
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."
42
+ "type": "guideline",
43
+ "content": "By default, a toast will dismiss when the user clicks the close button. A toast also has the option to auto-dismiss. Be sure to set a minimum of 5 seconds so that users can have time to read the toast message. If an actionable toast is set to auto-dismiss, make sure that the action is still available elsewhere in the app."
42
44
  },
43
45
  {
44
46
  "type": "guideline",
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."
47
+ "content": "When 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."
46
48
  },
47
49
  {
48
50
  "type": "guideline",
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."
51
+ "content": "The 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."
50
52
  },
51
53
  {
52
54
  "type": "guideline",
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."
55
+ "content": "Please refer to more multiple toasts usage guideline below."
54
56
  },
55
57
  {
56
58
  "type": "guideline",
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."
59
+ "content": "Toasts should only be used for confirmations, simple notifications, and low-priority alerts that do not need to completely interrupt the user experience."
58
60
  },
59
61
  {
60
62
  "type": "guideline",
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."
63
+ "content": "Dialogs are ideal for when a situation requires a user’s attention, either for displaying important information or prompting for a response."
62
64
  },
63
65
  {
64
66
  "type": "guideline",
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."
67
+ "content": "By default, a toast is placed at the bottom center for both desktop and mobile platform scales to avoid disrupting the user experience."
66
68
  },
67
69
  {
68
70
  "type": "guideline",
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."
71
+ "content": "For desktop applications, a toast should be placed 16 px away from the bottom of the viewport."
70
72
  },
71
73
  {
72
74
  "type": "guideline",
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."
75
+ "content": "If a toast isn’t noticeable or disrupts the user experience, its placement can be changed to bottom end, top end, or top center."
74
76
  },
75
77
  {
76
78
  "type": "guideline",
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."
79
+ "content": "Actionable toasts should only have one button."
78
80
  },
79
81
  {
80
82
  "type": "guideline",
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."
83
+ "content": "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."
82
84
  },
83
85
  {
84
86
  "type": "guideline",
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."
87
+ "content": "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."
86
88
  }
87
89
  ],
88
90
  "options": {
89
- "text": { "type": "string" },
91
+ "text": {
92
+ "type": "string"
93
+ },
90
94
  "variant": {
91
95
  "type": "string",
92
96
  "default": "neutral",
93
97
  "values": [
94
- { "value": "neutral" },
95
- { "value": "informative" },
96
- { "value": "positive" },
97
- { "value": "negative" }
98
+ {
99
+ "value": "neutral"
100
+ },
101
+ {
102
+ "value": "informative"
103
+ },
104
+ {
105
+ "value": "positive"
106
+ },
107
+ {
108
+ "value": "negative"
109
+ }
98
110
  ]
99
111
  },
100
112
  "actionLabel": {
101
113
  "type": "string",
102
114
  "description": "If undefined, this button does not appear."
103
115
  },
104
- "isAutoDismissible": { "type": "boolean", "default": false }
116
+ "isAutoDismissible": {
117
+ "type": "boolean",
118
+ "default": false
119
+ }
120
+ },
121
+ "lifecycle": {
122
+ "introduced": "1.0.0-draft"
105
123
  },
106
- "lifecycle": { "introduced": "1.0.0-draft" },
107
124
  "accessibility": {
108
125
  "intents": ["dismiss"],
109
126
  "focusable": true,
110
127
  "keyboardIntents": ["dismiss"],
111
128
  "wcag": [
112
- { "criterion": "4.1.3", "level": "AA", "title": "Status Messages" }
129
+ {
130
+ "criterion": "4.1.3",
131
+ "level": "AA",
132
+ "title": "Status Messages"
133
+ }
113
134
  ]
114
135
  }
115
136
  }
@@ -9,6 +9,19 @@
9
9
  "category": "feedback",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/tooltip/"
11
11
  },
12
+ "implementations": [
13
+ {
14
+ "platform": "web",
15
+ "componentName": "Tooltip",
16
+ "package": "@react-spectrum/s2"
17
+ },
18
+ {
19
+ "platform": "web",
20
+ "componentName": "Tooltip",
21
+ "importPath": "@adobe/spectrum-wc/components/tooltip",
22
+ "notes": "Spectrum 2 web component custom element: swc-tooltip."
23
+ }
24
+ ],
12
25
  "documentBlocks": [
13
26
  {
14
27
  "type": "purpose",
@@ -16,64 +29,94 @@
16
29
  },
17
30
  {
18
31
  "type": "guideline",
19
- "content": "Text overflow.\n\nWhen the label is too long for the available horizontal space, it wraps to form another line."
32
+ "content": "Tooltips display contextual information related to a specific component. They appear on hover or focus to clarify purpose or behavior."
33
+ },
34
+ {
35
+ "type": "guideline",
36
+ "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."
20
37
  },
21
38
  {
22
39
  "type": "guideline",
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."
40
+ "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."
24
41
  },
25
42
  {
26
43
  "type": "guideline",
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."
44
+ "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."
28
45
  },
29
46
  {
30
47
  "type": "guideline",
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."
48
+ "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."
32
49
  },
33
50
  {
34
51
  "type": "guideline",
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."
52
+ "content": "A tooltip is positioned in relation to its target."
36
53
  },
37
54
  {
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."
55
+ "type": "guideline",
56
+ "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)."
57
+ },
58
+ {
59
+ "type": "guideline",
60
+ "content": "The offset is the distance between the end of the tip and the target."
41
61
  },
42
62
  {
43
63
  "type": "guideline",
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."
64
+ "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."
45
65
  },
46
66
  {
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."
67
+ "type": "guideline",
68
+ "content": "When the label is too long for the available horizontal space, it wraps to form another line."
69
+ },
70
+ {
71
+ "type": "guideline",
72
+ "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."
50
73
  },
51
74
  {
52
75
  "type": "guideline",
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
+ "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."
54
77
  },
55
78
  {
56
79
  "type": "guideline",
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
+ "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."
58
81
  },
59
82
  {
60
83
  "type": "guideline",
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
+ "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."
62
85
  },
63
86
  {
64
87
  "type": "guideline",
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
+ "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."
89
+ },
90
+ {
91
+ "type": "guideline",
92
+ "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."
93
+ },
94
+ {
95
+ "type": "guideline",
96
+ "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."
97
+ },
98
+ {
99
+ "type": "guideline",
100
+ "content": "Tooltips appear only on hover or when in keyboard focus. They should not contain actions or links."
66
101
  }
67
102
  ],
68
103
  "options": {
69
- "label": { "type": "string" },
104
+ "label": {
105
+ "type": "string"
106
+ },
70
107
  "variant": {
71
108
  "type": "string",
72
109
  "default": "neutral",
73
110
  "values": [
74
- { "value": "neutral" },
75
- { "value": "informative" },
76
- { "value": "negative" }
111
+ {
112
+ "value": "neutral"
113
+ },
114
+ {
115
+ "value": "informative"
116
+ },
117
+ {
118
+ "value": "negative"
119
+ }
77
120
  ]
78
121
  },
79
122
  "hasIcon": {
@@ -90,13 +133,24 @@
90
133
  "type": "string",
91
134
  "default": "top",
92
135
  "values": [
93
- { "value": "top" },
94
- { "value": "bottom" },
95
- { "value": "left" },
96
- { "value": "right" }
136
+ {
137
+ "value": "top"
138
+ },
139
+ {
140
+ "value": "bottom"
141
+ },
142
+ {
143
+ "value": "left"
144
+ },
145
+ {
146
+ "value": "right"
147
+ }
97
148
  ]
98
149
  },
99
- "shouldFlip": { "type": "boolean", "default": false },
150
+ "shouldFlip": {
151
+ "type": "boolean",
152
+ "default": false
153
+ },
100
154
  "offset": {
101
155
  "type": "number",
102
156
  "default": 4,
@@ -108,7 +162,9 @@
108
162
  "description": "units: pixels"
109
163
  }
110
164
  },
111
- "lifecycle": { "introduced": "1.0.0-draft" },
165
+ "lifecycle": {
166
+ "introduced": "1.0.0-draft"
167
+ },
112
168
  "accessibility": {
113
169
  "role": "tooltip",
114
170
  "focusable": false,
@@ -118,7 +174,11 @@
118
174
  "level": "AA",
119
175
  "title": "Content on Hover or Focus"
120
176
  },
121
- { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
177
+ {
178
+ "criterion": "4.1.2",
179
+ "level": "A",
180
+ "title": "Name, Role, Value"
181
+ }
122
182
  ]
123
183
  }
124
184
  }