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
|`<dialog>`|`'request-close'`| If the `<dialog>` is `open`, request to close and use the button `value` for returnValue. Similar to `.requestClose(value) |
34
33
|`<* openable>`|`'toggle-openable'`| Opens the `openable` if closed, otherwise closes. Similar to `.toggleOpenable()`|
35
34
|`<* openable>`|`'close-openable'`| Closes the `openable` if open, otherwise does nothing. Similar to `.closeOpenable()`|
36
35
|`<* openable>`|`'open-openable'`| Opens the `openable` if closed, otherwise does nothing. Similar to `.openOpenable()`|
37
36
|`<details>`|`'toggle'`| If the `<details>` is `open`, then close it, otherwise open it |
38
37
|`<details>`|`'open'`| If the `<details>` is not `open`, then open it |
39
38
|`<details>`|`'close'`| If the `<details>` is `open`, then close it |
40
-
|`<dialog>`|`'toggle'`| If the `<dialog>` is `open`, then close it and use the button `value` for returnValue, otherwise open as modal |
41
39
|`<select>`|`'show-picker'`| Shows the native picker. Similar to `.showPicker()` on the invokee |
42
40
|`<input>`|`'show-picker'`| Shows the native picker. Similar to `.showPicker()` on the invokee |
43
41
|`<video>`|`'play-pause'`| If the video is not playing, plays the video. Otherwise pauses it. Similar to `el.playing = !el.playing`|
@@ -73,67 +71,6 @@ while (for simplicity) this section refers to various `aria-` attributes,
73
71
buttons will not sprout these attributes in the DOM, but the effective
74
72
equivalent will be exposed to Assistive Technologies.
75
73
76
-
#### Buttons with `command=request-close`
77
-
78
-
Buttons with this dialog command will implicitly receive `aria-details=IDREF`,
79
-
where `IDREF` matches that of the `commandfor` attribute, while the dialog is
80
-
in the showing state, and the button is not a descendant of the dialog.
81
-
82
-
<details>
83
-
<summary>Why?</summary>
84
-
85
-
A button that cancels a dialog is very typically found inside of the dialog, but
86
-
in some cases it may be found outside, perhaps as a "toggle" style button which
87
-
opens and closes a dialog as non-modal. This button may be used to close an open
88
-
dialog that is shown as non-modal. It may be useful for a user to traverse into
89
-
the dialog before closing it, for example to check if they have unsaved changes
90
-
within the dialog.
91
-
92
-
</details>
93
-
94
-
<br/><br/>
95
-
96
-
Buttons will also implicitly receive an `aria-expanded` value, if they are not a
97
-
descendant of the `commandfor=` referenced element. The state of the
98
-
`aria-expanded` value will map to the state of the dialog's openness. When the
99
-
dialog is open the button will have `aria-expanded="true"`, when closed,
100
-
`aria-expanded="false"`. This will be recomputed whenever the dialog changes
101
-
state, such that the button always reflects the state of openness.
102
-
103
-
<details>
104
-
<summary>Why?</summary>
105
-
106
-
A button that cancels a dialog is very typically found inside of the dialog, but
107
-
in some cases it may be found outside, perhaps as a "toggle" style button which
108
-
opens and closes a dialog as non-modal.
109
-
110
-
Buttons outside of the dialog may be used to close an open dialog that is shown
111
-
as non-modal. It may be useful for a user to traverse into the dialog before
112
-
closing it, for example to check if they have unsaved changes within the dialog.
113
-
It may also be useful to know if the dialog is already closed (as in its
114
-
`aria-expanded` state is false), as this may help the user make a decision to
115
-
whether or not they action the close button.
116
-
117
-
</details>
118
-
119
-
<br/><br/>
120
-
121
-
<details>
122
-
<summary>Other considerations not explicitly proposed.</summary>
123
-
124
-
##### aria-pressed
125
-
126
-
Given elements will have `aria-expanded`, adding `aria-pressed` would be
127
-
confusing or redundant, and as such won't be proposed for these buttons.
128
-
129
-
##### aria-controls
130
-
131
-
While `aria-controls` attempts to establish a similar style of relationship to
132
-
`aria-details`, `aria-details` sees broader support among various assistive
133
-
technologies, and it would be redundant to add both.
Copy file name to clipboardExpand all lines: site/src/pages/components/invokers.explainer.mdx
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -230,6 +230,7 @@ When the `command` attribute is missing it will default to an invalid state.
230
230
|`<* popover>`|`'show-popover'`| Shows the `popover` if closed, otherwise does nothing. Similar to `.showPopover()`|
231
231
|`<dialog>`|`'show-modal'`| If the `<dialog>` is not `open`, shows it as modal. Similar to `.showModal()`|
232
232
|`<dialog>`|`'close'`| If the `<dialog>` is `open`, close and use the button `value` for returnValue. Similar to `.close(value) |
233
+
|`<dialog>`|`'request-close'`| If the `<dialog>` is `open`, request to close and use the button `value` for returnValue. Similar to `.requestClose(value) |
0 commit comments