@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
@@ -9,6 +9,13 @@
9
9
  "category": "inputs",
10
10
  "documentationUrl": "https://spectrum.adobe.com/page/combo-box/"
11
11
  },
12
+ "implementations": [
13
+ {
14
+ "platform": "web",
15
+ "componentName": "ComboBox",
16
+ "package": "@react-spectrum/s2"
17
+ }
18
+ ],
12
19
  "documentBlocks": [
13
20
  {
14
21
  "type": "purpose",
@@ -16,138 +23,253 @@
16
23
  },
17
24
  {
18
25
  "type": "guideline",
19
- "content": "Minimum width.\n\nThe minimum width for a combo box is combo-box-minimum-width-multiplier (2.5× the height of the field button for standard style). This minimum width guarantees that small combo boxes are readable and easy to target on touch devices."
26
+ "content": "Combo boxes combine a text field with a picker menu. They support filtering longer lists by narrowing options based on typed input. Use when both freeform entry and guided selection are needed."
27
+ },
28
+ {
29
+ "type": "guideline",
30
+ "content": "A combo box can be marked as having an error to show that a value needs to be entered or that a value is invalid, prompting the user to correct their input before moving forward."
31
+ },
32
+ {
33
+ "type": "guideline",
34
+ "content": "A combo box can have help text below the field to give extra context or instruction about what a user should input in the field. The help text communicates a hint or helpful information, such as specific requirements for correctly filling out the field."
35
+ },
36
+ {
37
+ "type": "guideline",
38
+ "content": "Combo boxes have a read-only option for when content in the disabled state still needs to be shown. This allows for content to be copied, but not interacted with or changed. A combo box does not have a read-only option if no selection has been made."
39
+ },
40
+ {
41
+ "type": "guideline",
42
+ "content": "A combo box in a disabled state shows that an input field exists, but is not available in that circumstance. This can be used to maintain layout continuity and communicate that it may become available later."
43
+ },
44
+ {
45
+ "type": "guideline",
46
+ "content": "A combo box can be marked as having an error to show that a value needs to be entered in order to move forward, or that a value that was entered is invalid."
20
47
  },
21
48
  {
22
49
  "type": "guideline",
23
- "content": "Text overflow.\n\nWhen the field label and menu text are too long for the available horizontal space, they wrap to form another line. The field text itself truncates at the end, but the text can be shown in full in the menu."
50
+ "content": "There are 3 options for how a combo box’s menu can be triggered: when a user starts typing (“input”), when focus is placed on the input field (“focus”), and manually when the user clicks or taps the field button (“manual”). These are used for different degrees of the information complexity and/or user familiarity of menu options."
24
51
  },
25
52
  {
26
53
  "type": "guideline",
27
- "content": "Help text overflow.\n\nWhen the help text is too long for the available horizontal space, it wraps to form another line."
54
+ "content": "By default, the menu is triggered when a user starts typing. This should be used when the content is readily familiar or commonplace enough to a user that they can begin populating values without seeing a list of all available options."
28
55
  },
29
56
  {
30
57
  "type": "guideline",
31
- "content": "Menu height.\n\nThe combo box menu can be as tall as necessary to show as many options as possible in the available space. There is no maximum height."
58
+ "content": "If the content of the combo box is unfamiliar or complex, the menu should be triggered when focus is placed on the input field because a user would benefit from seeing example content before selecting a value."
32
59
  },
33
60
  {
34
61
  "type": "guideline",
35
- "content": "Combo box, picker, or radio buttons?\n\nThe text input functionality of the combo box is meant to make large lists easier to search. If you have fewer than 6 items, use radio buttons. If you have more than 6 items, consider whether your list of selections is complex enough to merit searching and filtering. If it's not complex enough for a combo box, you can use a picker."
62
+ "content": "If the content of the combo box is highly familiar and autocomplete is sufficient to surface options, the menu can be set to trigger manually."
36
63
  },
37
64
  {
38
65
  "type": "guideline",
39
- "content": "Suppressing the popover.\n\nIt's okay to suppress the popover when the combo box contains entries the user is familiar with, and when autocomplete is enabled. A suppressed popover can still be opened when the field button containing the chevron is clicked."
66
+ "content": "Combo boxes can automatically complete suggested results within the input field."
40
67
  },
41
68
  {
42
69
  "type": "guideline",
43
- "content": "Immediate popover launch.\n\nLaunch the popover immediately if your user is highly unfamiliar with the content in the combo box, or if the data is especially complex."
70
+ "content": "Combo boxes can be marked as optional or required, depending on the situation. For required combo boxes, there are two styling options: a “(required)” label or an asterisk. If you use an asterisk, be sure to include hint text to explain what the asterisk means. Optional combo boxes are either denoted with text added to the end of the label — “(optional)” — or have no indication at all."
44
71
  },
45
72
  {
46
73
  "type": "guideline",
47
- "content": "Delayed popover launch.\n\nLaunch the popover on text change if your user can get started typing without seeing a long list of options."
74
+ "content": "Combo boxes 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."
48
75
  },
49
76
  {
50
77
  "type": "guideline",
51
- "content": "Saving suggestions.\n\nWhen a suggestion is appended to the end of typed text, it remains the selected value when focus leaves the field. This guards against the scenario when a user sees a word completed in a field, continues to another form component, and the failure to commit changes erases the suggestion. When autocomplete is disabled, best matches get a hover style in the popover, but don't get saved as a value unless they're clicked on or \"Enter\" is pressed."
78
+ "content": "The value shows a user’s entered text or the option they’ve selected."
52
79
  },
53
80
  {
54
81
  "type": "guideline",
55
- "content": "Include a label.\n\nEvery combo box should have a label. A combo box without a label is ambiguous and not accessible. In rare cases where a label could be absent, make sure to have the design reviewed and approved by an accessibility expert."
82
+ "content": "Combo boxes should always have an accessible name, typically provided by a visible text label. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the visible label may be hidden. When no visible label is present, the input must still expose an accessible name (for example, in HTML via “aria-label” or “aria-labelledby,” and on other platforms via the platform’s accessible-name mechanism)."
56
83
  },
57
84
  {
58
85
  "type": "guideline",
59
- "content": "Keep menu items concise.\n\nKeep menu items short and concise. Long menu items that cause text to wrap to multiple lines are discouraged. If text wrapping becomes a frequent concern, consider revising the text or use alternative UI patterns that will give your content more space."
86
+ "content": "Labels can be placed either on top or on the side. Top labels are the default and are recommended because they work better with long copy, localization, and responsive layouts. Side labels are most useful when vertical space is limited."
60
87
  },
61
88
  {
62
89
  "type": "guideline",
63
- "content": "Truncation.\n\nChoose a width for your combo boxes that is likely to accommodate the majority of selections available within it. When a combo box is in focus and the typed input exceeds the width of the field, push the leftmost text out of sight while allowing text to continue to be entered towards the chevron. When a combo box is deselected, truncate the selected entry with ellipsis before it collides with the chevron button."
90
+ "content": "When the field label and menu text are too long for the available horizontal space, they wrap to form another line. The field text itself truncates at the end, but the text can be shown in full in the menu."
64
91
  },
65
92
  {
66
93
  "type": "guideline",
67
- "content": "Follow capitalization rules.\n\nField labels, placeholder text, and menu items should be in sentence case."
94
+ "content": "When the help text is too long for the available horizontal space, it wraps to form another line."
68
95
  },
69
96
  {
70
97
  "type": "guideline",
71
- "content": "Marking required vs. optional combo boxes in forms.\n\nWhen labeling combo boxes in a form, only mark the minority type—either required or optional—to reduce visual clutter: If most combo boxes are optional, mark only the required ones (e.g., add an asterisk or \"(required)\"). If most combo boxes are required, mark only the optional ones (e.g., append \"(optional)\" to their labels). Important: Never use an asterisk to indicate an optional combo box."
98
+ "content": "The combo box menu can be as tall as necessary to show as many options as possible in the available space. There is no maximum height."
72
99
  },
73
100
  {
74
101
  "type": "guideline",
75
- "content": "Use help text to show hints, formatting, and requirements.\n\nThe description in the help text is flexible and encompasses a range of guidance. Sometimes this guidance is about what to input, and sometime it's about how to input. This includes information such as: An overall description of the input field Hints for what kind of information needs to be input Specific formatting examples or requirements The help text's message should not simply restate the same information in the label in order to prompt someone to interact with it. Don't add help text if it isn't actually relevant or meaningful to a user in order to try to maintain layout continuity with other inputs that require help text."
102
+ "content": "The text input functionality of the combo box is meant to make large lists easier to search. If you have fewer than 6 items, use radio buttons. If you have more than 6 items, consider whether your list of selections is complex enough to merit searching and filtering. If it's not complex enough for a combo box, you can use a picker."
76
103
  },
77
104
  {
78
- "type": "do-dont",
79
- "content": "Don't use placeholder text",
80
- "dont": "Putting instructions for how to complete an input, requirements, or any other essential information into placeholder text is not accessible. Once a value is entered, placeholder text is no longer viewable; if someone is using an automatic form filler, they will never get the information in the placeholder text. Instead of placeholder text, use the help text description to convey requirements or to show any formatting examples that would help user comprehension. If there's placeholder text and help text at the same time, it becomes redundant and distracting, especially if they're communicating the same thing."
105
+ "type": "guideline",
106
+ "content": "It’s okay to suppress the popover when the combo box contains entries the user is familiar with, and when autocomplete is enabled. A suppressed popover can still be opened when the field button containing the chevron is clicked."
107
+ },
108
+ {
109
+ "type": "guideline",
110
+ "content": "Launch the popover immediately if your user is highly unfamiliar with the content in the combo box, or if the data is especially complex."
111
+ },
112
+ {
113
+ "type": "guideline",
114
+ "content": "Launch the popover on text change if your user can get started typing without seeing a long list of options."
115
+ },
116
+ {
117
+ "type": "guideline",
118
+ "content": "When a suggestion is appended to the end of typed text, it remains the selected value when focus leaves the field. This guards against the scenario when a user sees a word completed in a field, continues to another form component, and the failure to commit changes erases the suggestion."
119
+ },
120
+ {
121
+ "type": "guideline",
122
+ "content": "When autocomplete is disabled, best matches get a hover style in the popover, but don’t get saved as a value unless they’re clicked on or \"Enter\" is pressed."
123
+ },
124
+ {
125
+ "type": "guideline",
126
+ "content": "Every combo box should have a label. A combo box without a label is ambiguous and not accessible. In rare cases where a label could be absent, make sure to have the design reviewed and approved by an accessibility expert."
81
127
  },
82
128
  {
83
129
  "type": "guideline",
84
- "content": "Switch help text with error text.\n\nThe help text area also displays an error message. When a combo box already includes help text and an error is triggered, the help text is replaced with error text. Once the error is resolved, the help text description reappears below the field. Since one gets replaced by the other, the language of the help text and error text need to work together to convey the same messaging. Help text explains the requirement or adds supplementary context for how to successfully complete the input. Error text tells a user how to fix the error by re-stating the input requirements or describing the necessary interaction. Make sure that the help text and the error text include the same essential information so that it isn't lost if one replaces the other like minimum requirements."
130
+ "content": "Keep menu items short and concise. Long menu items that cause text to wrap to multiple lines are discouraged. If text wrapping becomes a frequent concern, consider revising the text or use alternative UI patterns that will give your content more space."
85
131
  },
86
132
  {
87
133
  "type": "guideline",
88
- "content": "Write error text that shows a solution.\n\nWrite error messaging in a human-centered way by guiding a user and showing them a solution — don't simply state what's wrong and then leave them guessing as to how to resolve it. Ambiguous error messages can be frustrating and even shame-inducing for users. Also, keep in mind that something that a system may deem an error may not actually be perceived as an error to a user. Error text should be written in 1-2 short, complete sentences and in a clear and straightforward way. End sentences with a period, and never with an exclamation point. For combo boxes, the nature of the error is often related to something that needs to be fixed for in-line validation, so a helpful tone is most appropriate. For example, if someone were to miss filling out a combo box that asks for them to choose a topic, write the error text like you're offering a hint or a tip to help guide them to understand what needs to go in the missing field: \"Choose at least one topic."
134
+ "content": "Choose a width for your combo boxes that is likely to accommodate the majority of selections available within it. When a combo box is in focus and the typed input exceeds the width of the field, push the leftmost text out of sight while allowing text to continue to be entered towards the chevron. When a combo box is deselected, truncate the selected entry with ellipsis before it collides with the chevron button."
89
135
  },
90
136
  {
91
137
  "type": "guideline",
92
- "content": "RTL.\n\nFor RTL (right-to-left) languages, the layout of a combo box is mirrored. The label is right-aligned and various decorations (e.g., character count, validation icon, error icon) are left-aligned. Make sure to consider that some types of content (e.g., email addresses) are not translated."
138
+ "content": "Field labels, placeholder text, and menu items should be in sentence case."
93
139
  },
94
140
  {
95
141
  "type": "guideline",
96
- "content": "Keyboard interactions.\n\nKey Interaction TypingInitiates autocomplete or popover (unless suppressed).Down ArrowIf the popover is unsuppressed and not already open, the down arrow opens the popover menu.Up or Down ArrowsMove through selection of options in popover or autocomplete.EscIf the popover is open, close the popover.EnterAccept highlighted suggestion.TabCommit current value and move focus.Alt + Down Arrow (optional)Open popup without moving focus.Alt + Up Arrow (optional)Close popup and return to input."
142
+ "content": "When labeling combo boxes in a form, only mark the minority type—either required or optional—to reduce visual clutter:"
97
143
  },
98
144
  {
99
145
  "type": "guideline",
100
- "content": "Cursor guidelines.\n\nCursor Description TextUse text cursor over editable fields in all states.PointerAny interactive control that is part of the field (e.g., clear/reveal/help icon) uses the pointer cursor."
146
+ "content": "Important: Never use an asterisk to indicate an optional combo box."
101
147
  },
102
148
  {
103
149
  "type": "guideline",
104
- "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 paired with a combo box (validation icons, clear-input icons), must provide a text alternative. All combo boxes need an accessible name (via a visible label, title, aria-label, or associated text) so screen readers can announce their purpose.Info and relationships, Identify purpose 1.3.1, 1.3.6 A, AAACombo boxes should be understandable by assistive technologies. The label, help text, error message, and required state must be programmatically associated with the field using semantic HTML or ARIA.Contrast 1.4.3 AAThe visual presentation of text has a contrast ratio of at least 4.5:1.Resize text 1.4.4 AACombo boxes can be resized up to 200% without loss of content or functionality and without assistive technology.Visual presentation 1.4.8 AAAThe width of text blocks is no more than 80 characters (40 for CJK languages), and text is never justified.Non-text contrast 1.4.11 AAThe visual presentation of illustrations, icons, and component states have a contrast ratio of at least 3:1. Not applicable for empty fields.Text spacing 1.4.12 AALine height of text is at least 1.5x the font size. 2. Operable RequirementCriterionLevel Compliance Keyboard 2.1.1, 2.1.3 A, AAAAll functionality of the component is operable through a keyboard without specific timing for keystrokes.Keyboard traps 2.1.2 AFocus can be moved away from the component using only a keyboard.Seizures and physical reactions 2.3.1, 2.3.2, 2.3.3 A, AAA, AAAThere is no flashing content or unnecessary motion or animation in this component.Focus order 2.4.3 ANavigation sequences receive focus in an order that preserves meaning and operability.Focus visible 2.4.7 AAKeyboard states use an indicator that is visible with at least 3:1 contrast."
150
+ "content": "The help text’s message should not simply restate the same information in the label in order to prompt someone to interact with it. Don’t add help text if it isn’t actually relevant or meaningful to a user in order to try to maintain layout continuity with other inputs that require help text."
151
+ },
152
+ {
153
+ "type": "guideline",
154
+ "content": "Putting instructions for how to complete an input, requirements, or any other essential information into placeholder text is not accessible. Once a value is entered, placeholder text is no longer viewable; if someone is using an automatic form filler, they will never get the information in the placeholder text."
155
+ },
156
+ {
157
+ "type": "guideline",
158
+ "content": "Instead of placeholder text, use the help text description to convey requirements or to show any formatting examples that would help user comprehension. If there's placeholder text and help text at the same time, it becomes redundant and distracting, especially if they're communicating the same thing."
159
+ },
160
+ {
161
+ "type": "guideline",
162
+ "content": "The help text area also displays an error message. When a combo box already includes help text and an error is triggered, the help text is replaced with error text. Once the error is resolved, the help text description reappears below the field."
163
+ },
164
+ {
165
+ "type": "guideline",
166
+ "content": "Since one gets replaced by the other, the language of the help text and error text need to work together to convey the same messaging. Help text explains the requirement or adds supplementary context for how to successfully complete the input. Error text tells a user how to fix the error by re-stating the input requirements or describing the necessary interaction. Make sure that the help text and the error text include the same essential information so that it isn’t lost if one replaces the other like minimum requirements."
167
+ },
168
+ {
169
+ "type": "guideline",
170
+ "content": "Write error messaging in a human-centered way by guiding a user and showing them a solution — don’t simply state what’s wrong and then leave them guessing as to how to resolve it. Ambiguous error messages can be frustrating and even shame-inducing for users. Also, keep in mind that something that a system may deem an error may not actually be perceived as an error to a user."
171
+ },
172
+ {
173
+ "type": "guideline",
174
+ "content": "Error text should be written in 1-2 short, complete sentences and in a clear and straightforward way. End sentences with a period, and never with an exclamation point. For combo boxes, the nature of the error is often related to something that needs to be fixed for in-line validation, so a helpful tone is most appropriate. For example, if someone were to miss filling out a combo box that asks for them to choose a topic, write the error text like you’re offering a hint or a tip to help guide them to understand what needs to go in the missing field: “Choose at least one topic.”"
105
175
  }
106
176
  ],
107
177
  "options": {
108
- "label": { "type": "string" },
178
+ "label": {
179
+ "type": "string"
180
+ },
109
181
  "labelPosition": {
110
182
  "type": "string",
111
183
  "default": "top",
112
184
  "values": [
113
- { "value": "top" },
114
- { "value": "side" },
115
- { "value": "in line" }
185
+ {
186
+ "value": "top"
187
+ },
188
+ {
189
+ "value": "side"
190
+ },
191
+ {
192
+ "value": "in line"
193
+ }
116
194
  ]
117
195
  },
118
- "value": { "type": "string" },
119
- "width": { "type": "number" },
196
+ "value": {
197
+ "type": "string"
198
+ },
199
+ "width": {
200
+ "type": "number"
201
+ },
120
202
  "size": {
121
203
  "type": "string",
122
204
  "default": "m",
123
205
  "values": [
124
- { "value": "s" },
125
- { "value": "m" },
126
- { "value": "l" },
127
- { "value": "xl" }
206
+ {
207
+ "value": "s"
208
+ },
209
+ {
210
+ "value": "m"
211
+ },
212
+ {
213
+ "value": "l"
214
+ },
215
+ {
216
+ "value": "xl"
217
+ }
128
218
  ]
129
219
  },
130
- "isRequired": { "type": "boolean", "default": false },
220
+ "isRequired": {
221
+ "type": "boolean",
222
+ "default": false
223
+ },
131
224
  "necessityIndicator": {
132
225
  "type": "string",
133
226
  "default": "icon",
134
- "values": [{ "value": "text" }, { "value": "icon" }]
227
+ "values": [
228
+ {
229
+ "value": "text"
230
+ },
231
+ {
232
+ "value": "icon"
233
+ }
234
+ ]
235
+ },
236
+ "hasAutocomplete": {
237
+ "type": "boolean",
238
+ "default": false
135
239
  },
136
- "hasAutocomplete": { "type": "boolean", "default": false },
137
240
  "menuTrigger": {
138
241
  "type": "string",
139
242
  "default": "input",
140
243
  "values": [
141
- { "value": "input" },
142
- { "value": "focus" },
143
- { "value": "manual" }
244
+ {
245
+ "value": "input"
246
+ },
247
+ {
248
+ "value": "focus"
249
+ },
250
+ {
251
+ "value": "manual"
252
+ }
144
253
  ]
145
254
  },
146
- "isError": { "type": "boolean", "default": false },
147
- "isDisabled": { "type": "boolean", "default": false },
148
- "isReadOnly": { "type": "boolean", "default": false },
149
- "description": { "type": "string" },
150
- "errorMessage": { "type": "string" }
255
+ "isError": {
256
+ "type": "boolean",
257
+ "default": false
258
+ },
259
+ "isDisabled": {
260
+ "type": "boolean",
261
+ "default": false
262
+ },
263
+ "isReadOnly": {
264
+ "type": "boolean",
265
+ "default": false
266
+ },
267
+ "description": {
268
+ "type": "string"
269
+ },
270
+ "errorMessage": {
271
+ "type": "string"
272
+ }
151
273
  },
152
274
  "states": [
153
275
  {
@@ -170,18 +292,35 @@
170
292
  "trigger": "prop",
171
293
  "description": "Focus without hover, when the field is focused but the pointer is not over it."
172
294
  },
173
- { "name": "keyboard-focus", "trigger": "interaction" }
295
+ {
296
+ "name": "keyboard-focus",
297
+ "trigger": "interaction"
298
+ }
174
299
  ],
175
- "lifecycle": { "introduced": "1.0.0-draft" },
300
+ "lifecycle": {
301
+ "introduced": "1.0.0-draft"
302
+ },
176
303
  "accessibility": {
177
304
  "role": "combobox",
178
305
  "intents": ["input", "select", "expand"],
179
306
  "focusable": true,
180
307
  "keyboardIntents": ["expand", "collapse", "navigate-options"],
181
308
  "wcag": [
182
- { "criterion": "1.3.1", "level": "A", "title": "Info and Relationships" },
183
- { "criterion": "2.1.1", "level": "A", "title": "Keyboard" },
184
- { "criterion": "4.1.2", "level": "A", "title": "Name, Role, Value" }
309
+ {
310
+ "criterion": "1.3.1",
311
+ "level": "A",
312
+ "title": "Info and Relationships"
313
+ },
314
+ {
315
+ "criterion": "2.1.1",
316
+ "level": "A",
317
+ "title": "Keyboard"
318
+ },
319
+ {
320
+ "criterion": "4.1.2",
321
+ "level": "A",
322
+ "title": "Name, Role, Value"
323
+ }
185
324
  ]
186
325
  }
187
326
  }