You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1st-gen/packages/combobox/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,7 +236,7 @@ For exceptional cases, provide an accessible label via the `label` attribute.
236
236
237
237
#### Provide help text and tooltips in the correct location
238
238
239
-
It is [not currently possible](https://w3c.github.io/webcomponents-cg/#cross-root-aria) to provide accessible ARIA references between elements in different shadow roots. To ensure proper association between elements, help text must be included via the `slot="help-text"` or `slot="help-text-negative"` and tooltips must be included via the `slot="tooltip"`.
239
+
It is [not currently possible](https://w3c.github.io/webcomponents-cg/#cross-root-aria) to provide accessible ARIA references between elements in different shadow roots. To ensure proper association between elements, help text must be included via the `slot="help-text"` or `slot="negative-help-text"` and tooltips must be included via the `slot="tooltip"`.
240
240
241
241
See [help text](../help-text) and [tooltip](../tooltip) for more information.
@@ -149,12 +149,12 @@ When the content associated to the element is disabled, use the `disabled` attri
149
149
150
150
Good, descriptive help text includes 1-2 short sentences of information such as:
151
151
152
-
-An overall description of an input field or controls
153
-
-Hints for what kind of information needs to be inputted or selected
154
-
-Specific formatting examples or requirements
152
+
- An overall description of an input field or controls
153
+
- Hints for what kind of information needs to be inputted or selected
154
+
- Specific formatting examples or requirements
155
155
156
156
#### Ensure help text and field share the same root
157
157
158
-
It is [not currently possible](https://w3c.github.io/webcomponents-cg/#cross-root-aria) to provide accessible ARIA references between elements in different shadow roots. To ensure proper association between elements, help text must be included via the `slot="help-text"` or `slot="help-text-negative"` in an `<sp-text-field>`, `<sp-field-group>`, `<sp-combobox>` or `<sp-picker>`.
158
+
It is [not currently possible](https://w3c.github.io/webcomponents-cg/#cross-root-aria) to provide accessible ARIA references between elements in different shadow roots. To ensure proper association between elements, help text must be included via the `slot="help-text"` or `slot="negative-help-text"` in an `<sp-text-field>`, `<sp-field-group>`, `<sp-combobox>` or `<sp-picker>`.
159
159
160
160
To add help text to your own custom element, see [Help Text Mixin](./help-text-mixin/).
The `triggerElement` property accepts an `HTMLElement` or a `VirtualTrigger` from which to position the Overlay.
271
301
272
302
- You can import the `VirtualTrigger` class from the overlay package to create a virtual trigger that can be used to position an Overlay. This is useful when you want to position an Overlay relative to a point on the screen that is not an element in the DOM, like the mouse cursor.
273
303
304
+
#### type
305
+
274
306
The `type` of an Overlay outlines a number of things about the interaction model within which it works:
The `type` of an Overlay outlines a number of things about the interaction model within which it works:
83
81
84
-
`'inline'` type inserts the overlay after the trigger in the tab order. This creates a natural flow where:
82
+
**Note:** The `type` attribute only affects click-triggered overlays. Hover overlays always use `hint` type behavior, and longpress overlays always use `auto` type behavior. For more control over hover and longpress overlay types, use `<sp-overlay>` directly.
`'modal'` Overlays create a modal context that traps focus within the content and prevents interaction with the rest of the page. The overlay manages focus trapping and accessibility features like `aria-modal="true"` to ensure proper screen reader behavior.
89
+
90
+
They should be used when you need to ensure that the user has interacted with the content of the Overlay before continuing with their work. This is commonly used for dialogs that require a user to confirm or cancel an action before continuing.
`'replace'`type inserts the overlay as if it were the trigger itself in the tab order. This means:
124
+
`'page'`Overlays behave similarly to `'modal'` Overlays by creating a modal context and trapping focus, but they will not be allowed to close via the "light dismiss" algorithm (e.g. the Escape key).
106
125
107
-
- Forward tab: Goes to the next logical element
108
-
- Backward tab (shift): Goes to the element before the trigger
126
+
A page overlay could be used for a full-screen menu on a mobile website. When the user clicks on the menu button, the entire screen is covered with the menu options.
109
127
110
128
```html
111
-
<overlay-triggertype="replace"placement="bottom">
112
-
<sp-buttonslot="trigger">Show Details</sp-button>
113
-
<sp-popoverslot="click-content">
114
-
<sp-dialog>
115
-
<p>Details panel that replaces trigger in tab order</p>
`'hint'` Overlays are much like tooltips so they are not just ephemeral, but they are delivered primarily as a visual helper and exist outside of the tab order. In this way, be sure _not_ to place interactive content within this type of Overlay.
147
+
148
+
This overlay type does not accept focus and does not interfere with the user's interaction with the rest of the page.
149
+
150
+
```html
151
+
<overlay-triggertype="hint"triggered-by="hover">
152
+
<sp-buttonslot="trigger">Open hint</sp-button>
153
+
<sp-tooltipslot="click-content">
154
+
I am a hint type overlay. I am not interactive and will close when the
155
+
user interacts with the page.
156
+
</sp-tooltip>
157
+
</overlay-trigger>
158
+
```
159
+
160
+
</sp-tab-panel>
161
+
<sp-tabvalue="auto">Auto</sp-tab>
162
+
<sp-tab-panelvalue="auto">
163
+
164
+
`'auto'` Overlays provide a place for content that is ephemeral _and_ interactive. These Overlays can accept focus and remain open while interacting with their content. They will close when focus moves outside the overlay or when clicking elsewhere on the page.
`'manual'` Overlays act much like `'auto'` Overlays, but do not close when losing focus or interacting with other parts of the page.
129
183
130
-
`'modal'`type creates a separate tab order and traps focus within the overlay content until the required interaction is complete. This is ideal for important interactions that need user attention.
184
+
Note: When a `'manual'`Overlay is at the top of the "overlay stack", it will still respond to the Escape key and close.
0 commit comments