@adobe/spectrum-design-data 3.3.0 → 3.5.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 (122) hide show
  1. package/components/accordion.json +32 -102
  2. package/components/action-bar.json +9 -23
  3. package/components/action-button.json +52 -92
  4. package/components/action-group.json +18 -129
  5. package/components/alert-banner.json +8 -27
  6. package/components/alert-dialog.json +45 -55
  7. package/components/avatar-group.json +20 -50
  8. package/components/avatar.json +44 -123
  9. package/components/badge.json +66 -160
  10. package/components/breadcrumbs.json +26 -100
  11. package/components/button-group.json +32 -63
  12. package/components/button.json +74 -105
  13. package/components/calendar.json +8 -67
  14. package/components/cards.json +31 -46
  15. package/components/checkbox-group.json +22 -84
  16. package/components/checkbox.json +33 -96
  17. package/components/close-button.json +31 -73
  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 +18 -18
  23. package/components/color-slider.json +26 -122
  24. package/components/color-wheel.json +17 -84
  25. package/components/combo-box.json +56 -188
  26. package/components/contextual-help.json +87 -126
  27. package/components/date-picker.json +24 -120
  28. package/components/divider.json +25 -38
  29. package/components/drop-zone.json +25 -37
  30. package/components/field-label.json +22 -59
  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 +31 -63
  35. package/components/list-view.json +15 -73
  36. package/components/menu.json +51 -180
  37. package/components/meter.json +35 -76
  38. package/components/number-field.json +34 -168
  39. package/components/picker.json +48 -187
  40. package/components/popover.json +47 -123
  41. package/components/progress-bar.json +33 -105
  42. package/components/progress-circle.json +25 -55
  43. package/components/radio-button.json +14 -67
  44. package/components/radio-group.json +34 -131
  45. package/components/rating.json +9 -38
  46. package/components/search-field.json +40 -125
  47. package/components/segmented-control.json +27 -69
  48. package/components/select-box.json +29 -96
  49. package/components/side-navigation.json +28 -69
  50. package/components/slider.json +45 -154
  51. package/components/standard-dialog.json +16 -88
  52. package/components/status-light.json +51 -133
  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 +42 -79
  57. package/components/table.json +26 -73
  58. package/components/tabs.json +35 -52
  59. package/components/tag-field.json +14 -60
  60. package/components/tag-group.json +22 -55
  61. package/components/tag.json +27 -77
  62. package/components/takeover-dialog.json +10 -61
  63. package/components/text-area.json +55 -204
  64. package/components/text-field.json +48 -169
  65. package/components/thumbnail.json +22 -63
  66. package/components/toast.json +30 -47
  67. package/components/tooltip.json +37 -84
  68. package/components/tree-view.json +51 -146
  69. package/fields/structure.json +1 -2
  70. package/guidelines/ai-resource-guide.json +42 -0
  71. package/guidelines/app-frame-overview.json +45 -44
  72. package/guidelines/applying-the-type-system.json +71 -0
  73. package/guidelines/attention-hierarchy.json +13 -22
  74. package/guidelines/background-layers.json +84 -10
  75. package/guidelines/bi-directionality.json +57 -0
  76. package/guidelines/border-width.json +70 -0
  77. package/guidelines/brand.json +24 -12
  78. package/guidelines/cognitive.json +229 -0
  79. package/guidelines/colors.json +55 -17
  80. package/guidelines/component-spacing.json +65 -0
  81. package/guidelines/contact-us.json +27 -0
  82. package/guidelines/containers.json +21 -28
  83. package/guidelines/content-area-browsing-context.json +73 -0
  84. package/guidelines/creating-bluelines-browsing-context.json +71 -0
  85. package/guidelines/design-tokens.json +186 -0
  86. package/guidelines/developer-overview.json +33 -9
  87. package/guidelines/drop-shadow.json +76 -0
  88. package/guidelines/faqs.json +100 -9
  89. package/guidelines/fonts.json +33 -14
  90. package/guidelines/grammar-and-mechanics.json +276 -0
  91. package/guidelines/grays.json +17 -44
  92. package/guidelines/header-browsing-context.json +40 -0
  93. package/guidelines/icon-fundamentals.json +7 -18
  94. package/guidelines/illustration.json +120 -0
  95. package/guidelines/in-product-word-list.json +25 -0
  96. package/guidelines/inclusive-design.json +101 -0
  97. package/guidelines/inclusive-ux-writing.json +34 -0
  98. package/guidelines/internationalization.json +103 -0
  99. package/guidelines/layout-spacing.json +39 -0
  100. package/guidelines/manifest.json +280 -16
  101. package/guidelines/motion.json +18 -13
  102. package/guidelines/object-styles-overview.json +17 -0
  103. package/guidelines/principles.json +7 -8
  104. package/guidelines/resources.json +29 -15
  105. package/guidelines/rounding.json +85 -0
  106. package/guidelines/side-navigation-browsing-context.json +74 -0
  107. package/guidelines/spacing-overview.json +78 -0
  108. package/guidelines/states.json +16 -11
  109. package/guidelines/support.json +125 -0
  110. package/guidelines/typography-overview.json +39 -0
  111. package/guidelines/typography-system.json +212 -0
  112. package/guidelines/using-icons.json +32 -47
  113. package/guidelines/voice-and-tone.json +51 -0
  114. package/guidelines/whats-new.json +21 -0
  115. package/guidelines/writing-about-people.json +99 -0
  116. package/guidelines/writing-for-errors.json +140 -0
  117. package/guidelines/writing-for-onboarding.json +123 -0
  118. package/guidelines/writing-for-readability.json +66 -0
  119. package/guidelines/writing-with-visuals.json +78 -0
  120. package/llms.txt +27 -0
  121. package/package.json +3 -2
  122. package/tokens/layout.tokens.json +88 -0
@@ -9,13 +9,6 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/switch/"
11
11
  },
12
- "implementations": [
13
- {
14
- "platform": "web",
15
- "componentName": "Switch",
16
- "package": "@react-spectrum/s2"
17
- }
18
- ],
19
12
  "documentBlocks": [
20
13
  {
21
14
  "type": "purpose",
@@ -23,141 +16,111 @@
23
16
  },
24
17
  {
25
18
  "type": "guideline",
26
- "content": "Switches toggle an individual option on or off. They're typically used to activate or deactivate a specific setting."
19
+ "content": "Keyboard focus.\n\nA switch can be navigated using a keyboard. The keyboard focus state takes the switch's visual hover state and adds a blue ring to the switch in focus."
27
20
  },
28
21
  {
29
22
  "type": "guideline",
30
- "content": "Switch should always have a label for accessibility and clear comprehension. When the label is not defined, a switch becomes standalone. Standalone switches should only be used when their connection to other components is clear and they give sufficient context — for example, in application panels."
23
+ "content": "Text overflow.\n\nWhen the label is too long for the horizontal space available, it wraps to form another line."
31
24
  },
32
25
  {
33
26
  "type": "guideline",
34
- "content": "Switches can either be selected or not selected. They cannot be in an indeterminate state (unlike checkboxes). When a switch represents multiple values that are not identical, the switch should appear as not selected."
27
+ "content": "When to use an emphasized switch?\n\nEmphasized switches are optimal for forms, settings, and other scenarios where the switches need to be noticed. Not emphasized switches are optimal for application panels where all the visual components are monochrome in order to direct focus to the canvas."
35
28
  },
36
29
  {
37
30
  "type": "guideline",
38
- "content": "Switch come in four different sizes: small, medium, large, and extra-large. The medium size is the default and most frequently used option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page."
31
+ "content": "When to use a standalone switch?\n\nStandalone switches should be used in situations where the context is clear without an associated text label. For example, a switch located at the top of a panel next to the panel's title makes it clear that the switch will enable/disable the panel options."
39
32
  },
40
33
  {
41
34
  "type": "guideline",
42
- "content": "By default, switches are not emphasized (gray). This version is optimal for when the switch is not the core part of an interface, such as in application panels, where all visual components are monochrome in order to direct focus to the content."
35
+ "content": "Switch, checkbox or radio button?\n\nSwitches are best for communicating activation (e.g., turning a setting on or off). Checkboxes are best for communicating selection (e.g., selecting multiple items from a list). Radio buttons are best when only one option can be selected at a time from a set (e.g., choosing one preference or mode)."
43
36
  },
44
37
  {
45
38
  "type": "guideline",
46
- "content": "The emphasized (blue) version provides a visual prominence that is optimal for forms, settings, lists or grids of assets, and other situations where a switch needs to be noticed."
39
+ "content": "Representing mixed values.\n\nWhen a switch represents multiple values that are not identical, the switch should appear as not selected. Any subsequent click or tap should select the switch, and update all values to be selected. Another click or tap after that should deselect the switch, and update all values to be not selected."
47
40
  },
48
41
  {
49
42
  "type": "guideline",
50
- "content": "A switch in a disabled state shows that an action exists, but is not available in that circumstance. This state can be used to maintain layout continuity and to communicate that an action may become available later."
43
+ "content": "No partial state.\n\nSwitches can only be on or off. Indeterminate switches don't exist in accessibility APIs, so it's not possible to make an indeterminate switch accessible. If you need to show a partial state, use a checkbox instead of a switch. When a parent switch represents a group of switches, it should be turned off unless all of the switches are on (turning the parent switch on turns all of the switches on)."
51
44
  },
52
45
  {
53
46
  "type": "guideline",
54
- "content": "Switches have a read-only option for when they’re in the disabled state but still need their labels to be shown. This allows for content to be copied, but not interacted with or changed."
47
+ "content": "A label for a switch describes a setting that is either on or off — two mutually exclusive states. Use a short description (1-3 words) of the setting. Try to include all necessary information in the label, but it's OK to add clarifying text after to supplement if needed. Keep in mind that when a user takes an action on a switch, that action will often affect other content in an experience. Think systematically to ensure that all labels are paralleling each other in their writing."
55
48
  },
56
49
  {
57
50
  "type": "guideline",
58
- "content": "A switch can be navigated using a keyboard. The keyboard focus state takes the switch’s visual hover state and adds a blue ring to the switch in focus."
51
+ "content": "Consider if the label should use a verb or a noun.\n\nA switch shows a state of persistence for something — a noun or a proper noun — as either being \"on\" or \"off.\" A verb isn't usually needed to communicate the thing being turned on or off, but there can be instances where phrasing the label as a verb can aid in clarity. Just try to keep switches consistently using either verbs or nouns if you have more than one of them in a single view."
59
52
  },
60
53
  {
61
54
  "type": "guideline",
62
- "content": "When the label is too long for the horizontal space available, it wraps to form another line."
55
+ "content": "Avoid using verb phrases related to a state of activity.\n\nAvoid using verb phrases related to activity states in a switch label, such as \"turn on\" or \"turn off.\" A switch is naturally either in a state of being on or off — active or inactive — so repeating in the label that something is \"on\" or \"off\" is redundant and clutters an interface."
63
56
  },
64
57
  {
65
58
  "type": "guideline",
66
- "content": "Emphasized switches are optimal for forms, settings, and other scenarios where the switches need to be noticed. Not emphasized switches are optimal for application panels where all the visual components are monochrome in order to direct focus to the canvas."
59
+ "content": "Use a neutral tone.\n\nBecause switches are used for controls and utility, their labels are written in a neutral, utilitarian way. There's no need for overly celebratory language."
67
60
  },
68
61
  {
69
62
  "type": "guideline",
70
- "content": "Standalone switches should be used in situations where the context is clear without an associated text label. For example, a switch located at the top of a panel next to the panel's title makes it clear that the switch will enable/disable the panel options."
63
+ "content": "Use \"you\" or \"your\" if needed to refer to the user directly.\n\nDescribe switches objectively by using only the names of features or settings, or what those features and settings will do. In the case where it's necessary to refer to a user directly, do so sparingly and use the second person \"you/your.\" We aim to be conversational and talk to the user — not as them."
71
64
  },
72
65
  {
73
66
  "type": "guideline",
74
- "content": "Switches are best for communicating activation (e.g., turning a setting on or off). Checkboxes are best for communicating selection (e.g., selecting multiple items from a list). Radio buttons are best when only one option can be selected at a time from a set (e.g., choosing one preference or mode)."
67
+ "content": "Use sentence case.\n\nFollowing Adobe's UX writing style, labels for switches are written in sentence case unless they contain words that are branded terms."
75
68
  },
76
69
  {
77
70
  "type": "guideline",
78
- "content": "When a switch represents multiple values that are not identical, the switch should appear as not selected. Any subsequent click or tap should select the switch, and update all values to be selected. Another click or tap after that should deselect the switch, and update all values to be not selected."
71
+ "content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of the switch is mirrored. The track is placed on the right side of the text and the handle is positioned to the left when the switch is turned on."
79
72
  },
80
73
  {
81
74
  "type": "guideline",
82
- "content": "Switches can only be on or off. Indeterminate switches don’t exist in accessibility APIs, so it’s not possible to make an indeterminate switch accessible. If you need to show a partial state, use a checkbox instead of a switch."
75
+ "content": "Keyboard interactions.\n\nKey Interaction Tab Moves focus to the next item or group of items. Shift + Tab Moves focus to the previous item or group of items. Space or Enter Toggles the switch between on and off."
83
76
  },
84
77
  {
85
78
  "type": "guideline",
86
- "content": "When a parent switch represents a group of switches, it should be turned off unless all of the switches are on (turning the parent switch on turns all of the switches on)."
79
+ "content": "Cursor guidelines.\n\nCursor Description Pointer Use the pointer cursor for interactive elements in all states."
80
+ },
81
+ {
82
+ "type": "guideline",
83
+ "content": "WCAG 2.2 compliance.\n\nAny criterion not mention in the below table are not applicable to this component or are resolved with underlying requirements, engineering, and styles of the entire system. 1. Perceivable Requirement Criterion Level Compliance Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAA Switches 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 A Switches never rely on color alone to convey meaning. The active state uses blue to reinforce “on,” and the handle shifts position to clearly show whether the switch is on or off. Text contrast minimums 1.4.3 AA Large 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 AA Switches should be built in such a way that they can be resized without assistive technology up to 200%. Non-text contrast 1.4.11 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line height of text is at least 1.5x the font size when the label is wrapped. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus 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, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
84
+ }
85
+ ],
86
+ "implementations": [
87
+ {
88
+ "platform": "web",
89
+ "componentName": "Switch",
90
+ "package": "@react-spectrum/s2"
87
91
  }
88
92
  ],
89
93
  "options": {
90
- "label": {
91
- "type": "string"
92
- },
93
- "isSelected": {
94
- "type": "boolean",
95
- "default": false
96
- },
94
+ "label": { "type": "string" },
95
+ "isSelected": { "type": "boolean", "default": false },
97
96
  "size": {
98
97
  "type": "string",
99
98
  "default": "m",
100
99
  "values": [
101
- {
102
- "value": "s"
103
- },
104
- {
105
- "value": "m"
106
- },
107
- {
108
- "value": "l"
109
- },
110
- {
111
- "value": "xl"
112
- }
100
+ { "value": "s" },
101
+ { "value": "m" },
102
+ { "value": "l" },
103
+ { "value": "xl" }
113
104
  ]
114
105
  },
115
- "isEmphasized": {
116
- "type": "boolean",
117
- "default": false
118
- },
119
- "isDisabled": {
120
- "type": "boolean",
121
- "default": false
122
- },
123
- "isReadOnly": {
124
- "type": "boolean",
125
- "default": false
126
- }
106
+ "isEmphasized": { "type": "boolean", "default": false },
107
+ "isDisabled": { "type": "boolean", "default": false },
108
+ "isReadOnly": { "type": "boolean", "default": false }
127
109
  },
128
110
  "states": [
129
- {
130
- "name": "hover",
131
- "trigger": "interaction"
132
- },
133
- {
134
- "name": "down",
135
- "trigger": "interaction"
136
- },
137
- {
138
- "name": "keyboard-focus",
139
- "trigger": "interaction"
140
- }
111
+ { "name": "hover", "trigger": "interaction" },
112
+ { "name": "down", "trigger": "interaction" },
113
+ { "name": "keyboard-focus", "trigger": "interaction" }
141
114
  ],
142
- "lifecycle": {
143
- "introduced": "1.0.0-draft"
144
- },
115
+ "lifecycle": { "introduced": "1.0.0-draft" },
145
116
  "accessibility": {
146
117
  "role": "switch",
147
118
  "intents": ["choose"],
148
119
  "focusable": true,
149
120
  "keyboardIntents": ["activate"],
150
121
  "wcag": [
151
- {
152
- "criterion": "2.1.1",
153
- "level": "A",
154
- "title": "Keyboard"
155
- },
156
- {
157
- "criterion": "4.1.2",
158
- "level": "A",
159
- "title": "Name, Role, Value"
160
- }
122
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
123
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
161
124
  ]
162
125
  }
163
126
  }
@@ -16,79 +16,64 @@
16
16
  },
17
17
  {
18
18
  "type": "guideline",
19
- "content": "Tables organize and display structured information in rows and columns. They support scanning, sorting, comparing, and interacting with large amounts of data. Use when multiple data points need to be reviewed or acted on in one place."
19
+ "content": "Standard vs. quiet.\n\nUse a standard table when a table is the main focus of an experience. Quiet tables are for when a table is meant to be supplementary, subtle, or lightweight."
20
20
  },
21
21
  {
22
22
  "type": "guideline",
23
- "content": "Tables come in three sizes: small, medium, and large. Size affects the overall scale, including font size and spacing. Medium is the default. Use large for high-visibility tables or when readability is critical. Use small in constrained spaces or when the table is secondary to other content."
24
- },
25
- {
26
- "type": "guideline",
27
- "content": "If true, the table header is hidden."
28
- },
29
- {
30
- "type": "guideline",
31
- "content": "Configuration for the table header row."
32
- },
33
- {
34
- "type": "guideline",
35
- "content": "Tables come in three densities: compact, regular, and spacious. Density controls vertical spacing while keeping font sizes consistent—compact rows have tighter padding, spacious rows have more breathing room. Regular is the default for most use cases. Use compact when fitting more data in a limited viewport is critical (e.g., dashboards, data-heavy admin panels). Use spacious when scannability and visual comfort are priorities (e.g., transaction histories, settings tables with minimal data)."
23
+ "content": "Column dividers help organize table content and aid users in parsing related data. You can apply dividers selectively to group related columns—for example, separating user information from action columns, or grouping metadata fields together. Use dividers sparingly to avoid visual clutter."
36
24
  },
37
25
  {
38
26
  "type": "guideline",
39
- "content": "Use a standard table when a table is the main focus of an experience. Quiet tables are for when a table is meant to be supplementary, subtle, or lightweight."
27
+ "content": "Selection.\n\nBy default, rows are not selectable. Enable selection with selectionMode=single or selectionMode=multiple. Checkbox selection (default): Checkboxes appear on the left. Clicking toggles selection. Use for bulk actions or when selection should be explicit. Highlight selection: No checkboxes—rows show a highlighted background when selected. Clicking a row selects it (use modifier keys for multi-select). Use when rows also need to support navigation or actions via onAction or href, or when a cleaner appearance is needed. Navigation: Use onAction for row actions or href for links. In highlight selection style, double-click performs actions while single-click selects, allowing both behaviors."
40
28
  },
41
29
  {
42
30
  "type": "guideline",
43
- "content": "If true, table columns can be sorted."
31
+ "content": "Hover state.\n\nAll tables have a hover state regardless of if actions or selections can be made. This aids the user in viewing content in a single row."
44
32
  },
45
33
  {
46
34
  "type": "guideline",
47
- "content": "An array of column definitions for the table."
35
+ "content": "Start-align textual data.\n\nSimilar to a paragraph of text, textual data should be start-aligned within a table (left-aligned in LTR languages, right-aligned in RTL languages). Never use center alignment."
48
36
  },
49
37
  {
50
38
  "type": "guideline",
51
- "content": "An array of row data for the table."
39
+ "content": "Right align numerical data.\n\nNumerical data should generally be right-aligned for ease of scanning and comparing. This alignment typically does NOT reverse in RTL languages because: Numbers are written left-to-right even in RTL languages (e.g., Arabic numerals) Right-alignment ensures decimal places and digits line up vertically for comparison Exception: Use start-alignment (left in LTR, right in RTL) when numbers are arbitrary identifiers, known as \"nominal numbers,\" which can't be compared or combined arithmetically (e.g., ZIP codes, IP addresses, phone numbers). These behave like text. Column headers follow the alignment of their data."
52
40
  },
53
41
  {
54
42
  "type": "guideline",
55
- "content": "Column dividers help organize table content and aid users in parsing related data. You can apply dividers selectively to group related columns—for example, separating user information from action columns, or grouping metadata fields together. Use dividers sparingly to avoid visual clutter."
43
+ "content": "Use tabular numbers for numerical data.\n\nWhen users need to compare numerical values, use tabular (monospaced) and lining (not old style) numbers to make it easier. These features are supported by Adobe Clean via the OpenType panel in Illustrator or via the CSS font feature settings."
56
44
  },
57
45
  {
58
46
  "type": "guideline",
59
- "content": "All tables have a hover state regardless of if actions or selections can be made. This aids the user in viewing content in a single row."
47
+ "content": "Respect vertical alignment.\n\nAll content should be centered vertically within the row to offer the right visual balance."
60
48
  },
61
49
  {
62
- "type": "guideline",
63
- "content": "Similar to a paragraph of text, textual data should be start-aligned within a table (left-aligned in LTR languages, right-aligned in RTL languages). Never use center alignment."
50
+ "type": "do-dont",
51
+ "content": "Don't use zebra stripes",
52
+ "dont": "Tables use row dividers, hover states, and selection highlighting to help users track data. Zebra striping adds visual noise without improving usability."
64
53
  },
65
54
  {
66
55
  "type": "guideline",
67
- "content": "Numerical data should generally be right-aligned for ease of scanning and comparing. This alignment typically does NOT reverse in RTL languages because:"
56
+ "content": "Use column dividers sparingly.\n\nColumn dividers are optional decorations that can help organize table content and create groups of data. Only use these when necessary, and don't add them to every column."
68
57
  },
69
58
  {
70
59
  "type": "guideline",
71
- "content": "Exception: Use start-alignment (left in LTR, right in RTL) when numbers are arbitrary identifiers, known as \"nominal numbers,\" which can't be compared or combined arithmetically (e.g., ZIP codes, IP addresses, phone numbers). These behave like text."
60
+ "content": "Use an en dash (–) for missing values.\n\nWhen there are gaps in the data, use an en dash (–) to represent null or not applicable (N/A) values."
72
61
  },
73
62
  {
74
63
  "type": "guideline",
75
- "content": "Column headers follow the alignment of their data."
64
+ "content": "RTL.\n\nIn right‑to‑left languages, the table layout is mirrored. The columns run from right to left, and the text alignment within each column is reversed. Keep in mind that some content, such as file extensions and email addresses, does not change direction or translate."
76
65
  },
77
66
  {
78
67
  "type": "guideline",
79
- "content": "All content should be centered vertically within the row to offer the right visual balance."
68
+ "content": "Keyboard interactions.\n\nKey Interaction Tab Tabbing into an item that has a tooltip associated with it (e.g., an icon) shows the tooltip. Esc Hides the tooltip."
80
69
  },
81
70
  {
82
71
  "type": "guideline",
83
- "content": "Tables use row dividers, hover states, and selection highlighting to help users track data. Zebra striping adds visual noise without improving usability."
72
+ "content": "Cursor guidelines.\n\nCursor Description Pointer If 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. Pointer If the tooltip has a link, use the pointer cursor when interacting with the link."
84
73
  },
85
74
  {
86
75
  "type": "guideline",
87
- "content": "Column dividers are optional decorations that can help organize table content and create groups of data. Only use these when necessary, and don't add them to every column."
88
- },
89
- {
90
- "type": "guideline",
91
- "content": "When there are gaps in the data, use an en dash (–) to represent null or not applicable (N/A) values."
76
+ "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 A Non‑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 purpose 1.3.1, 1.3.6 A, AAA Tooltips should be understandable by assistive technologies like screen readers. This means using the proper semantic HTML or ARIA role should be utilized. Use of color 1.4.1 A Color 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 minimums 1.4.3 AA Large 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 AA Tooltips should be built in such a way that they can be resized without assistive technology up to 200%. Visual presentation 1.4.8 AAA The 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 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line height of text is at least 1.5x the font size in wrapped tooltips. 2. Operable Requirement Criterion Level Compliance Keyboard 2.1.1, 2.1.3 A, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus 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, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
92
77
  }
93
78
  ],
94
79
  "options": {
@@ -96,17 +81,7 @@
96
81
  "type": "string",
97
82
  "default": "m",
98
83
  "description": "Controls the density of table rows.",
99
- "values": [
100
- {
101
- "value": "s"
102
- },
103
- {
104
- "value": "m"
105
- },
106
- {
107
- "value": "l"
108
- }
109
- ]
84
+ "values": [{ "value": "s" }, { "value": "m" }, { "value": "l" }]
110
85
  },
111
86
  "hideHeader": {
112
87
  "type": "boolean",
@@ -135,15 +110,9 @@
135
110
  "type": "string",
136
111
  "default": "regular",
137
112
  "values": [
138
- {
139
- "value": "compact"
140
- },
141
- {
142
- "value": "regular"
143
- },
144
- {
145
- "value": "spacious"
146
- }
113
+ { "value": "compact" },
114
+ { "value": "regular" },
115
+ { "value": "spacious" }
147
116
  ]
148
117
  },
149
118
  "isQuiet": {
@@ -240,34 +209,18 @@
240
209
  "name": "header-row-checkbox",
241
210
  "description": "Select-all checkbox within the column header row."
242
211
  },
243
- {
244
- "name": "section-header"
245
- }
212
+ { "name": "section-header" }
246
213
  ],
247
- "lifecycle": {
248
- "introduced": "1.0.0-draft"
249
- },
214
+ "lifecycle": { "introduced": "1.0.0-draft" },
250
215
  "accessibility": {
251
216
  "role": "grid",
252
217
  "intents": ["select", "navigate"],
253
218
  "focusable": true,
254
219
  "keyboardIntents": ["navigate-items", "activate", "select-all"],
255
220
  "wcag": [
256
- {
257
- "criterion": "1.3.1",
258
- "level": "A",
259
- "title": "Info and Relationships"
260
- },
261
- {
262
- "criterion": "2.1.1",
263
- "level": "A",
264
- "title": "Keyboard"
265
- },
266
- {
267
- "criterion": "4.1.2",
268
- "level": "A",
269
- "title": "Name, Role, Value"
270
- }
221
+ { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
222
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
223
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
271
224
  ]
272
225
  }
273
226
  }
@@ -9,19 +9,6 @@
9
9
  "category": "navigation",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/tabs/"
11
11
  },
12
- "implementations": [
13
- {
14
- "platform": "web",
15
- "componentName": "Tabs",
16
- "package": "@react-spectrum/s2"
17
- },
18
- {
19
- "platform": "web",
20
- "componentName": "Tabs",
21
- "importPath": "@adobe/spectrum-wc/components/tabs",
22
- "notes": "Spectrum 2 web component custom element: swc-tabs."
23
- }
24
- ],
25
12
  "documentBlocks": [
26
13
  {
27
14
  "type": "purpose",
@@ -29,61 +16,72 @@
29
16
  },
30
17
  {
31
18
  "type": "guideline",
32
- "content": "Tabs organize related content into multiple sections. They allow navigation between views while keeping the content grouped under a single context. Use when content can be divided logically into categories within the same view."
19
+ "content": "Animation.\n\nWhen a user selects a tab item, the selection indicator slides along the base to the newly selected tab. The text and icon colors of both tabs fade during the transition. The tab view changes immediately upon selection."
33
20
  },
34
21
  {
35
22
  "type": "guideline",
36
- "content": "Tabs can be horizontal or vertical. By default, tabs are horizontal and should be used when horizontal space is limited."
23
+ "content": "Tab overflow.\n\nWhen there are too many tabs to fit horizontally across the viewport, display the tabs component as a quiet picker. When appropriate, you can also use alternative overflow methods such as horizontal scrolling."
37
24
  },
38
25
  {
39
26
  "type": "guideline",
40
- "content": "Use vertical tabs when horizontal space is more generous or when the list of sections is too long for a horizontal layout. Vertical tabs can also serve as anchor links, providing shortcuts to sections on a single page. In this case, tab items link to on-page anchors rather than opening a new tab view."
27
+ "content": "Too many tabs.\n\nWhen there are too many tabs to fit horizontally across the viewport, you can either allow horizontal scrolling or place all tab items in a quiet picker. Do not truncate multiple tab items just to make them fit horizontally."
28
+ },
29
+ {
30
+ "type": "do-dont",
31
+ "content": "Don't use tabs for varying levels of importance",
32
+ "dont": "Use tabs to organize sections of equal importance. Groups of content under each tab item should not be of different natures. Don't use tabs to replace a flow; use pagination components instead."
41
33
  },
42
34
  {
43
35
  "type": "guideline",
44
- "content": "When a user selects a tab item, the selection indicator slides along the base to the newly selected tab. The text and icon colors of both tabs fade during the transition. The tab view changes immediately upon selection."
36
+ "content": "Nested tabs.\n\nAvoid using multiple levels of tabs. Instead, consider other organizational patterns such as side navigation, accordions or collapsible panels. Nesting tabs is acceptable only when there is a clear separation between the two tab experiences or when different orientations are used. Do not compromise hierarchy by using the same tab variations or orientations."
45
37
  },
46
38
  {
47
39
  "type": "guideline",
48
- "content": "When there are too many tabs to fit horizontally across the viewport, display the tabs component as a quiet picker. When appropriate, you can also use alternative overflow methods such as horizontal scrolling."
40
+ "content": "Use icons consistently.\n\nDon't mix the use of icons in tabs. Navigation controls require a clear spacial relationship to one another, and mixing the use of icons can dramatically impact the visual balance and presence for each tab item. Keep in mind that if one tab item has an icon, then they all should have an icon."
49
41
  },
50
42
  {
51
43
  "type": "guideline",
52
- "content": "When there are too many tabs to fit horizontally across the viewport, you can either allow horizontal scrolling or place all tab items in a quiet picker. Do not truncate multiple tab items just to make them fit horizontally."
44
+ "content": "Use tooltips for icon only tabs.\n\nIt can often be hard to identify the meaning of icon-only tabs. An icon-only tab should always show a tooltip displaying the label on hover."
53
45
  },
54
46
  {
55
47
  "type": "guideline",
56
- "content": "Use tabs to organize sections of equal importance. Groups of content under each tab item should not be of different natures. Don't use tabs to replace a flow; use pagination components instead."
48
+ "content": "RTL horizontal tabs.\n\nFor RTL (right-to-left) languages, the layout of the horizontal tabs is mirrored. The tabs are right-aligned and their order is reverse."
57
49
  },
58
50
  {
59
51
  "type": "guideline",
60
- "content": "Avoid using multiple levels of tabs. Instead, consider other organizational patterns such as side navigation, accordions or collapsible panels. Nesting tabs is acceptable only when there is a clear separation between the two tab experiences or when different orientations are used."
52
+ "content": "RTL vertical tabs.\n\nFor RTL (right-to-left) languages, the layout of the vertical tabs is mirrored. The divider and selection indicator should be placed on the right, as they are meant to visually anchor the text labels."
61
53
  },
62
54
  {
63
55
  "type": "guideline",
64
- "content": "Do not compromise hierarchy by using the same tab variations or orientations."
56
+ "content": "Keyboard interactions.\n\nThere are two possible behaviors for manipulating tabs with the keyboard: manual or automatic activation. Typically, manual activation of tabs is only necessary when content cannot be displayed instantly (i.e., not all the panel content is present in the DOM.) For additional guidance, see Deciding When to Make Selection Automatically Follow Focus. Option 1: Manual activation Key Interaction Tab Moves focus into the tabs component and places focus on the selected tab item. If the tabs component is already in focus, moves focus to the next element in the page tab sequence. Left Arrow Moves focus to the previous tab item. If focus is on the first tab item, moves focus to the last tab item. Right Arrow Moves focus to the next tab item. If focus is on the last tab item, moves focus to the first tab item. Space or Enter Activates the tab item in focus. Home (optional) Moves focus to the first tab item. End (optional) Moves focus to the last tab item. Delete (optional) When deletion is allowed, Delete closes the currently activated tab item. If any tab items remain, moves focus to the tab item following one that was closed. Option 2: Automatic activation Key Interaction Tab Moves focus into the tabs component and places focus on the selected tab item. If the tabs component is already in focus, moves focus to the next element in the page tab sequence. Left Arrow Moves focus to the previous tab item and automatically activates it. If focus is on the first tab item, moves focus to the last tab item. Right Arrow Moves focus to the next tab item and automatically activates it. If focus is on the last tab item, moves focus to the first tab item. Home (optional) Moves focus to the first tab item and automatically activates it. End (optional) Moves focus to the last tab item and automatically activates it. Delete (optional) When deletion is allowed, Delete closes the currently activated tab item. If any tab items remain, moves focus to and activates the tab item following one that was closed."
65
57
  },
66
58
  {
67
59
  "type": "guideline",
68
- "content": "Don’t mix the use of icons in tabs. Navigation controls require a clear spacial relationship to one another, and mixing the use of icons can dramatically impact the visual balance and presence for each tab item. Keep in mind that if one tab item has an icon, then they all should have an icon."
60
+ "content": "Cursor guidelines.\n\nCursor Usage Pointer Use the pointer cursor for interactive elements including tabs."
69
61
  },
70
62
  {
71
63
  "type": "guideline",
72
- "content": "It can often be hard to identify the meaning of icon-only tabs. An icon-only tab should always show a tooltip displaying the label on hover."
64
+ "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 A Non-text elements, such as icons used in tabs, must provide a text alternative that communicates the tab's purpose. All tabs, especially icon-only tabs, 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, AAA Tabs should be understandable by assistive technologies like screen readers. This means the proper semantic HTML or ARIA role should be utilized. Orientation 1.3.4 AA Tabs are available in both vertical and horizontal orientations. Use of color 1.4.1 A Color is not used as a means to convey information or distinguish elements. Contrast 1.4.3 AA The visual presentation of text has a contrast ratio of at least 4.5:1. Resize text 1.4.4 AA Tabs should be built in such a way that they can be resized without assistive technology up to 200%. Visual presentation 1.4.8 AAA The 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 AA The visual presentation of icons and various states have a contrast ratio of at least 3:1. Text spacing 1.4.12 AA Line 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, AAA All functionality of the component is operable through a keyboard without specific timing for keystrokes. Keyboard traps 2.1.2 A Focus 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, AAA There is no flashing content or unnecessary motion or animation in this component. Focus order 2.4.3 A Navigation sequences receive focus in an order that preserves meaning and operability. Focus visible 2.4.7 AA Keyboard states use an indicator that is visible with at least 3:1 contrast."
65
+ }
66
+ ],
67
+ "implementations": [
68
+ {
69
+ "platform": "web",
70
+ "componentName": "Tabs",
71
+ "package": "@react-spectrum/s2"
72
+ },
73
+ {
74
+ "platform": "web",
75
+ "componentName": "Tabs",
76
+ "importPath": "@adobe/spectrum-wc/components/tabs",
77
+ "notes": "Spectrum 2 web component custom element: swc-tabs."
73
78
  }
74
79
  ],
75
80
  "options": {
76
81
  "orientation": {
77
82
  "type": "string",
78
83
  "default": "horizontal",
79
- "values": [
80
- {
81
- "value": "horizontal"
82
- },
83
- {
84
- "value": "vertical"
85
- }
86
- ]
84
+ "values": [{ "value": "horizontal" }, { "value": "vertical" }]
87
85
  },
88
86
  "items": {
89
87
  "type": "array",
@@ -122,18 +120,13 @@
122
120
  "default": false,
123
121
  "description": "This overrides density and is only applicable to horizontal tabs."
124
122
  },
125
- "isEmphasized": {
126
- "type": "boolean",
127
- "default": false
128
- },
123
+ "isEmphasized": { "type": "boolean", "default": false },
129
124
  "alignment": {
130
125
  "type": "string",
131
126
  "enum": ["start", "center"],
132
127
  "default": "start"
133
128
  },
134
- "selectedItem": {
135
- "description": "(list of available items)"
136
- },
129
+ "selectedItem": { "description": "(list of available items)" },
137
130
  "keyboardActivation": {
138
131
  "type": "string",
139
132
  "enum": ["manual", "automatic"],
@@ -143,9 +136,7 @@
143
136
  }
144
137
  }
145
138
  },
146
- "lifecycle": {
147
- "introduced": "1.0.0-draft"
148
- },
139
+ "lifecycle": { "introduced": "1.0.0-draft" },
149
140
  "tokenBindings": [
150
141
  {
151
142
  "token": "tab-item-to-tab-item-compact-horizontal-medium",
@@ -161,16 +152,8 @@
161
152
  "focusable": true,
162
153
  "keyboardIntents": ["navigate-items"],
163
154
  "wcag": [
164
- {
165
- "criterion": "2.1.1",
166
- "level": "A",
167
- "title": "Keyboard"
168
- },
169
- {
170
- "criterion": "4.1.2",
171
- "level": "A",
172
- "title": "Name, Role, Value"
173
- }
155
+ { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
156
+ { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
174
157
  ]
175
158
  }
176
159
  }