forked from leobalter/cross-root-aria-delegation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.bs
454 lines (386 loc) · 27.2 KB
/
index.bs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
<pre class='metadata'>
Title: Cross-root Aria Reflection
Shortname: cross-root-aria-reflection
Level: 1
Status: w3c/UD
Group: webcomponents
URL: https://westbrook.github.io/cross-root-aria-reflection/
Editor: Westbrook Johnson, Adobe http://www.adobe.com, [email protected], http://github.com/westbrook
Abstract: A shadowRoot reflection API to allow for ARIA attributes and properties set on a elements in a shadow root to be relfected to their host element.
</pre>
Introduction {#intro}
=====================
Content on the web being accessible is critically important. Maintaining accessibility within web components is challenging as the shadow root encapsulation prevents references between elements in different roots. These references are fundamental to enable assistive technologies within web applications.
Today, a web application can be composed by many web components that are connected through different relationships. ARIA is the appropriate standard to describe those relationships. Unfortunately, it's not possible to natively connect ARIA attributes from elements belonging to different DOM trees belonging to the main page and one or many web components. Because of that, some complex and not fully successful workarounds need to be applied.
- Observing and moving ARIA-related attributes across elements (for role, etc.).
- Using non-standard attributes for ARIA features, in order to apply them to elements in a shadow root.
- Requiring usage of custom elements to wrap/slot elements so that ARIA attributes can be placed directly on them. This gets very complicated as the number of slotted inputs and levels of shadow root nesting increase.
- Duplicating nodes across shadow root boundaries.
- Abandoning Shadow DOM.
<section class=informative>
## This proposal
This proposal introduces a reflection API to allow for ARIA attributes and properties set on elements in a shadow root to be reflected into the parent DOM tree through their host element.
This mechanism will allow users to apply standard best practices for ARIA and resolve a large margin of accessibility use cases for applications of native Web components and native Shadow DOM. This API is most suited for one-to-one delegation, but should also work for one-to-many scenarios. There is no mechanism for directly relating two elements in different shadowroots together, but this will still be possible manually with the element reflection API.
The proposed extension adds a new `reflects*` (e.g.: `reflectsAriaLabel`, `reflectsAriaDescribedBy`) options to the `.attachShadow` method similarly to the `reflectsFocus`, while introducing a new content attribute `reflect*` (e.g.: `reflectarialabel`, `reflectariadescribedby`) to be used in the shadowroot inner elements. This has an advantage that it works with Declarative Shadow DOM as well, and it is consistent with `reflectsFocus`. Even though, it requires another set of html attributes in the declarative shadow root template. The declarative form works better with common developer paradigm where you may not necessarily have access to a DOM node right where you're creating / declaring it.
<aside class="example" title="How to use it">
The ARIA attributes assigned in the host x-foo are delegated to inner elements inside the component's shadowroot. Today, custom code can reflect this application but synthetically applying the aria attributes and their effects to both the host x-foo and its inner elements.
<pre highlight="html">
<template id="template1">
<input id="input" reflectarialabel reflectariadescribedby />
<span reflectarialabel>Another target</span>
</template>
<span id="foo">Description!</span>
<x-foo aria-label="Hello!" aria-describedby="foo"></x-foo>
</pre>
<pre highlight="js">
const template = document.getElementById('template1');
class XFoo extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open", reflectsAriaLabel: true, reflectsAriaDescribedBy: true });
this.shadowRoot.appendChild(template.content.cloneNode(true));
}
}
customElements.define("x-foo", XFoo);
</pre>
For instance when delegating aria-label you want readers to know that it applies to the input, not both the input and the host. There are current workarounds include copying the attribute over and removing it from the host, but that introduces other problems.
- <a href="https://glitch.com/edit/#!/delegation-via-attr?path=x-foo.js%3A24%3A0">Live example</a>
</aside>
<p class="ednote">The attributes names such as `shadowrootreflects*` are very long and some consideration for shorter names by removing the `shadowroot` prefix can be discussed as long the discussion is sync'ed with the stakeholders of the respective Declarative Shadow DOM proposal.</p>
</section>
# IDL Interface
Conforming user agents MUST implement the following IDL interface.
## Interface Mixin <dfn>ReflectARIAMixin</dfn>
<pre class="idl">
interface mixin ReflectARIAMixin {
attribute DOMString? reflectAriaAtomic;
attribute DOMString? reflectAriaAutoComplete;
attribute DOMString? reflectAriaBusy;
attribute DOMString? reflectAriaChecked;
attribute DOMString? reflectAriaColCount;
attribute DOMString? reflectAriaColIndex;
attribute DOMString? reflectAriaColIndexText;
attribute DOMString? reflectAriaColSpan;
attribute DOMString? reflectAriaCurrent;
attribute DOMString? reflectAriaDescription;
attribute DOMString? reflectAriaDisabled;
attribute DOMString? reflectAriaExpanded;
attribute DOMString? reflectAriaHasPopup;
attribute DOMString? reflectAriaHidden;
attribute DOMString? reflectAriaInvalid;
attribute DOMString? reflectAriaKeyShortcuts;
attribute DOMString? reflectAriaLabel;
attribute DOMString? reflectAriaLevel;
attribute DOMString? reflectAriaLive;
attribute DOMString? reflectAriaModal;
attribute DOMString? reflectAriaMultiLine;
attribute DOMString? reflectAriaMultiSelectable;
attribute DOMString? reflectAriaOrientation;
attribute DOMString? reflectAriaPlaceholder;
attribute DOMString? reflectAriaPosInSet;
attribute DOMString? reflectAriaPressed;
attribute DOMString? reflectAriaReadOnly;
attribute DOMString? reflectAriaRequired;
attribute DOMString? reflectAriaRoleDescription;
attribute DOMString? reflectAriaRowCount;
attribute DOMString? reflectAriaRowIndex;
attribute DOMString? reflectAriaRowIndexText;
attribute DOMString? reflectAriaRowSpan;
attribute DOMString? reflectAriaSelected;
attribute DOMString? reflectAriaSetSize;
attribute DOMString? reflectAriaSort;
attribute DOMString? reflectAriaValueMax;
attribute DOMString? reflectAriaValueMin;
attribute DOMString? reflectAriaValueNow;
attribute DOMString? reflectAriaValueText;
};
</pre>
Interfaces that include `ReflectARIAMixin` must provide the following algorithms:
- <dfn>`ReflectARIAMixin` getter steps</dfn>, which take the host interface instance, IDL attribute name, and content attribute name, and must return a string value; and
- <dfn>`ReflectARIAMixin` setter steps</dfn>, which take the host interface instance, IDL attribute name, content attribute name, and string value, and must return nothing.
For every IDL attribute <var>idlAttribute</var> defined in `ReflectARIAMixin`, on getting, it must perform the following steps:
1. Let <var>contentAttribute</var> be the ReflectARIA content attribute determined by looking up <var>idlAttribute</var> in the ReflectARIA Attribute Correspondence table.
1. Return the result of running the <a>`ReflectARIAMixin` getter steps</a>, given this, <var>idlAttribute</var>, and <var>contentAttribute</var>.
Similarly, on setting, it must perform the following steps:
1. Let <var>contentAttribute</var> be the ReflectARIA content attribute determined by looking up <var>idlAttribute</var> in the ReflectARIA Attribute Correspondence table.
1. Run the <a>`ReflectARIAMixin` setter steps</a>, given this, <var>idlAttribute</var>, <var>contentAttribute</var>, and the given value.
## ReflectARIA Attribute Correspondence
The following table provides a correspondence between IDL attribute names and content attribute names, for use by `ReflectARIAMixin`.
<table>
<tr><th>IDL Attribute</th><th>Reflected ReflectARIA Content Attribute</th></tr>
<tr><td><dfn>reflectAriaAtomic</dfn></td><td><pref>reflectariaatomic</pref></td></tr>
<tr><td><dfn>reflectAriaAutoComplete</dfn></td><td><pref>reflectariaautocomplete</pref></td></tr>
<tr><td><dfn>reflectAriaBusy</dfn></td><td><sref>reflectariabusy</sref></td></tr>
<tr><td><dfn>reflectAriaChecked</dfn></td><td><sref>reflectariachecked</sref></td></tr>
<tr><td><dfn>reflectAriaColCount</dfn></td><td><pref>reflectariacolcount</pref></td></tr>
<tr><td><dfn>reflectAriaColIndex</dfn></td><td><pref>reflectariacolindex</pref></td></tr>
<tr><td><dfn>reflectAriaColIndexText</dfn></td><td><pref>reflectariacolindextext</pref></td></tr>
<tr><td><dfn>reflectAriaColSpan</dfn></td><td><pref>reflectariacolspan</pref></td></tr>
<tr><td><dfn>reflectAriaCurrent</dfn></td><td><sref>reflectariacurrent</sref></td></tr>
<tr><td><dfn>reflectAriaDescription</dfn></td><td><pref>reflectariadescription</pref></td></tr>
<tr><td><dfn>reflectAriaDisabled</dfn></td><td><sref>reflectariadisabled</sref></td></tr>
<tr><td><dfn>reflectAriaExpanded</dfn></td><td><sref>reflectariaexpanded</sref></td></tr>
<tr><td><dfn>reflectAriaHasPopup</dfn></td><td><pref>reflectariahaspopup</pref></td></tr>
<tr><td><dfn>reflectAriaHidden</dfn></td><td><sref>reflectariahidden</sref></td></tr>
<tr><td><dfn>reflectAriaInvalid</dfn></td><td><sref>reflectariainvalid</sref></td></tr>
<tr><td><dfn>reflectAriaKeyShortcuts</dfn></td><td><pref>reflectariakeyshortcuts</pref></td></tr>
<tr><td><dfn>reflectAriaLabel</dfn></td><td><pref>reflectarialabel</pref></td></tr>
<tr><td><dfn>reflectAriaLevel</dfn></td><td><pref>reflectarialevel</pref></td></tr>
<tr><td><dfn>reflectAriaLive</dfn></td><td><pref>reflectarialive</pref></td></tr>
<tr><td><dfn>reflectAriaModal</dfn></td><td><pref>reflectariamodal</pref></td></tr>
<tr><td><dfn>reflectAriaMultiLine</dfn></td><td><pref>reflectariamultiline</pref></td></tr>
<tr><td><dfn>reflectAriaMultiSelectable</dfn></td><td><pref>reflectariamultiselectable</pref></td></tr>
<tr><td><dfn>reflectAriaOrientation</dfn></td><td><pref>reflectariaorientation</pref></td></tr>
<tr><td><dfn>reflectAriaPlaceholder</dfn></td><td><pref>reflectariaplaceholder</pref></td></tr>
<tr><td><dfn>reflectAriaPosInSet</dfn></td><td><pref>reflectariaposinset</pref></td></tr>
<tr><td><dfn>reflectAriaPressed</dfn></td><td><sref>reflectariapressed</sref></td></tr>
<tr><td><dfn>reflectAriaReadOnly</dfn></td><td><pref>reflectariareadonly</pref></td></tr>
<tr><td><dfn>reflectAriaRequired</dfn></td><td><pref>reflectariarequired</pref></td></tr>
<tr><td><dfn>reflectAriaRoleDescription</dfn></td><td><pref>reflectariaroledescription</pref></td></tr>
<tr><td><dfn>reflectAriaRowCount</dfn></td><td><pref>reflectariarowcount</pref></td></tr>
<tr><td><dfn>reflectAriaRowIndex</dfn></td><td><pref>reflectariarowindex</pref></td></tr>
<tr><td><dfn>reflectAriaRowIndexText</dfn></td><td><pref>reflectariarowindextext</pref></td></tr>
<tr><td><dfn>reflectAriaRowSpan</dfn></td><td><pref>reflectariarowspan</pref></td></tr>
<tr><td><dfn>reflectAriaSelected</dfn></td><td><sref>reflectariaselected</sref></td></tr>
<tr><td><dfn>reflectAriaSetSize</dfn></td><td><pref>reflectariasetsize</pref></td></tr>
<tr><td><dfn>reflectAriaSort</dfn></td><td><pref>reflectariasort</pref></td></tr>
<tr><td><dfn>reflectAriaValueMax</dfn></td><td><pref>reflectariavaluemax</pref></td></tr>
<tr><td><dfn>reflectAriaValueMin</dfn></td><td><pref>reflectariavaluemin</pref></td></tr>
<tr><td><dfn>reflectAriaValueNow</dfn></td><td><pref>reflectariavaluenow</pref></td></tr>
<tr><td><dfn>reflectAriaValueText</dfn></td><td><pref>reflectariavaluetext</pref></td></tr>
</table>
## `ReflectARIAMixin` Mixed in to `Element`
User agents MUST include `ReflectARIAMixin` on `Element`:
<pre class="idl">
Element includes ReflectARIAMixin;
</pre>
For `Element`:
- The <a>`ReflectARIAMixin` getter steps</a> given <var>element</var>, <var>idlAttribute</var>, and <var>contentAttribute</var> are to return the result of the getter algorithm for <var>idlAttribute</var> <a href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflect">reflecting<<var>contentAttribute</var> on <var>element</var>.
- The <a>`ReflectARIAMixin` setter steps</a> given <var>element</var>, <var>idlAttribute</var>, <var>contentAttribute</var>, and <var>value</var> are to perform the setter algorithm for <var>idlAttribute</var> <a href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflect">reflecting</a> <var>contentAttribute</var> on <var>element</var>, given <var>value</var>.
Note: In practice, this means that, e.g., the `reflectAriaAtomic` IDL on `Element` reflects the `reflectariaatomic` content attribute;
---
## Interface Mixin <dfn>ShadowRootMixin</dfn>
<pre class="idl">
interface mixin ShadowRootMixin {
attribute DOMString? reflectsAriaAtomic;
attribute DOMString? reflectsAriaAutoComplete;
attribute DOMString? reflectsAriaBusy;
attribute DOMString? reflectsAriaChecked;
attribute DOMString? reflectsAriaColCount;
attribute DOMString? reflectsAriaColIndex;
attribute DOMString? reflectsAriaColIndexText;
attribute DOMString? reflectsAriaColSpan;
attribute DOMString? reflectsAriaCurrent;
attribute DOMString? reflectsAriaDescription;
attribute DOMString? reflectsAriaDisabled;
attribute DOMString? reflectsAriaExpanded;
attribute DOMString? reflectsAriaHasPopup;
attribute DOMString? reflectsAriaHidden;
attribute DOMString? reflectsAriaInvalid;
attribute DOMString? reflectsAriaKeyShortcuts;
attribute DOMString? reflectsAriaLabel;
attribute DOMString? reflectsAriaLevel;
attribute DOMString? reflectsAriaLive;
attribute DOMString? reflectsAriaModal;
attribute DOMString? reflectsAriaMultiLine;
attribute DOMString? reflectsAriaMultiSelectable;
attribute DOMString? reflectsAriaOrientation;
attribute DOMString? reflectsAriaPlaceholder;
attribute DOMString? reflectsAriaPosInSet;
attribute DOMString? reflectsAriaPressed;
attribute DOMString? reflectsAriaReadOnly;
attribute DOMString? reflectsAriaRequired;
attribute DOMString? reflectsAriaRoleDescription;
attribute DOMString? reflectsAriaRowCount;
attribute DOMString? reflectsAriaRowIndex;
attribute DOMString? reflectsAriaRowIndexText;
attribute DOMString? reflectsAriaRowSpan;
attribute DOMString? reflectsAriaSelected;
attribute DOMString? reflectsAriaSetSize;
attribute DOMString? reflectsAriaSort;
attribute DOMString? reflectsAriaValueMax;
attribute DOMString? reflectsAriaValueMin;
attribute DOMString? reflectsAriaValueNow;
attribute DOMString? reflectsAriaValueText;
};
</pre>
Interfaces that include `ShadowRootMixin` must provide the following algorithms:
- <dfn>`ShadowRootMixin` getter steps</dfn>, which take the host interface instance, IDL attribute name, and content attribute name, and must return a string value; and
- <dfn>`ShadowRootMixin` setter steps</dfn>, which take the host interface instance, IDL attribute name, content attribute name, and string value, and must return nothing.
For every IDL attribute <var>idlAttribute</var> defined in `ShadowRootMixin`, on getting, it must perform the following steps:
1. Let <var>contentAttribute</var> be the ReflectARIA content attribute determined by looking up <var>idlAttribute</var> in the ReflectARIA Attribute Correspondence table.
1. Return the result of running the <a>`ShadowRootMixin` getter steps</a>, given this, <var>idlAttribute</var>, and <var>contentAttribute</var>.
Similarly, on setting, it must perform the following steps:
1. Let <var>contentAttribute</var> be the ReflectARIA content attribute determined by looking up <var>idlAttribute</var> in the ReflectARIA Attribute Correspondence table.
1. Run the <a>`ShadowRootMixin` setter steps</a>, given this, <var>idlAttribute</var>, <var>contentAttribute</var>, and the given value.
## ShadowRoot Attribute Correspondence
The following table provides a correspondence between IDL attribute names and content attribute names, for use by `ShadowRootMixin`.
<table>
<tr><th>IDL Attribute</th><th>Reflected ShadowRoot Content Attribute</th></tr>
<tr><td><dfn>reflectsAriaAtomic</dfn></td><td><pref>reflectsariaatomic</pref></td></tr>
<tr><td><dfn>reflectsAriaAutoComplete</dfn></td><td><pref>reflectsariaautocomplete</pref></td></tr>
<tr><td><dfn>reflectsAriaBusy</dfn></td><td><sref>reflectsariabusy</sref></td></tr>
<tr><td><dfn>reflectsAriaChecked</dfn></td><td><sref>reflectsariachecked</sref></td></tr>
<tr><td><dfn>reflectsAriaColCount</dfn></td><td><pref>reflectsariacolcount</pref></td></tr>
<tr><td><dfn>reflectsAriaColIndex</dfn></td><td><pref>reflectsariacolindex</pref></td></tr>
<tr><td><dfn>reflectsAriaColIndexText</dfn></td><td><pref>reflectsariacolindextext</pref></td></tr>
<tr><td><dfn>reflectsAriaColSpan</dfn></td><td><pref>reflectsariacolspan</pref></td></tr>
<tr><td><dfn>reflectsAriaCurrent</dfn></td><td><sref>reflectsariacurrent</sref></td></tr>
<tr><td><dfn>reflectsAriaDescription</dfn></td><td><pref>reflectsariadescription</pref></td></tr>
<tr><td><dfn>reflectsAriaDisabled</dfn></td><td><sref>reflectsariadisabled</sref></td></tr>
<tr><td><dfn>reflectsAriaExpanded</dfn></td><td><sref>reflectsariaexpanded</sref></td></tr>
<tr><td><dfn>reflectsAriaHasPopup</dfn></td><td><pref>reflectsariahaspopup</pref></td></tr>
<tr><td><dfn>reflectsAriaHidden</dfn></td><td><sref>reflectsariahidden</sref></td></tr>
<tr><td><dfn>reflectsAriaInvalid</dfn></td><td><sref>reflectsariainvalid</sref></td></tr>
<tr><td><dfn>reflectsAriaKeyShortcuts</dfn></td><td><pref>reflectsariakeyshortcuts</pref></td></tr>
<tr><td><dfn>reflectsAriaLabel</dfn></td><td><pref>reflectsarialabel</pref></td></tr>
<tr><td><dfn>reflectsAriaLevel</dfn></td><td><pref>reflectsarialevel</pref></td></tr>
<tr><td><dfn>reflectsAriaLive</dfn></td><td><pref>reflectsarialive</pref></td></tr>
<tr><td><dfn>reflectsAriaModal</dfn></td><td><pref>reflectsariamodal</pref></td></tr>
<tr><td><dfn>reflectsAriaMultiLine</dfn></td><td><pref>reflectsariamultiline</pref></td></tr>
<tr><td><dfn>reflectsAriaMultiSelectable</dfn></td><td><pref>reflectsariamultiselectable</pref></td></tr>
<tr><td><dfn>reflectsAriaOrientation</dfn></td><td><pref>reflectsariaorientation</pref></td></tr>
<tr><td><dfn>reflectsAriaPlaceholder</dfn></td><td><pref>reflectsariaplaceholder</pref></td></tr>
<tr><td><dfn>reflectsAriaPosInSet</dfn></td><td><pref>reflectsariaposinset</pref></td></tr>
<tr><td><dfn>reflectsAriaPressed</dfn></td><td><sref>reflectsariapressed</sref></td></tr>
<tr><td><dfn>reflectsAriaReadOnly</dfn></td><td><pref>reflectsariareadonly</pref></td></tr>
<tr><td><dfn>reflectsAriaRequired</dfn></td><td><pref>reflectsariarequired</pref></td></tr>
<tr><td><dfn>reflectsAriaRoleDescription</dfn></td><td><pref>reflectsariaroledescription</pref></td></tr>
<tr><td><dfn>reflectsAriaRowCount</dfn></td><td><pref>reflectsariarowcount</pref></td></tr>
<tr><td><dfn>reflectsAriaRowIndex</dfn></td><td><pref>reflectsariarowindex</pref></td></tr>
<tr><td><dfn>reflectsAriaRowIndexText</dfn></td><td><pref>reflectsariarowindextext</pref></td></tr>
<tr><td><dfn>reflectsAriaRowSpan</dfn></td><td><pref>reflectsariarowspan</pref></td></tr>
<tr><td><dfn>reflectsAriaSelected</dfn></td><td><sref>reflectsariaselected</sref></td></tr>
<tr><td><dfn>reflectsAriaSetSize</dfn></td><td><pref>reflectsariasetsize</pref></td></tr>
<tr><td><dfn>reflectsAriaSort</dfn></td><td><pref>reflectsariasort</pref></td></tr>
<tr><td><dfn>reflectsAriaValueMax</dfn></td><td><pref>reflectsariavaluemax</pref></td></tr>
<tr><td><dfn>reflectsAriaValueMin</dfn></td><td><pref>reflectsariavaluemin</pref></td></tr>
<tr><td><dfn>reflectsAriaValueNow</dfn></td><td><pref>reflectsariavaluenow</pref></td></tr>
<tr><td><dfn>reflectsAriaValueText</dfn></td><td><pref>reflectsariavaluetext</pref></td></tr>
</table>
## `ShadowRootMixin` Mixed in to `ShadowRoot`
User agents MUST include `ShadowRootMixin` on `ShadowRoot`:
<pre class="idl">
ShadowRoot includes ShadowRootMixin;
</pre>
For `ShadowRoot`:
- The <a>`ShadowRootMixin` getter steps</a> given <var>element</var>, <var>idlAttribute</var>, and <var>contentAttribute</var> are to return the result of the getter algorithm for <var>idlAttribute</var> <a href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflect">reflecting<<var>contentAttribute</var> on <var>element</var>.
- The <a>`ShadowRootMixin` setter steps</a> given <var>element</var>, <var>idlAttribute</var>, <var>contentAttribute</var>, and <var>value</var> are to perform the setter algorithm for <var>idlAttribute</var> <a href="https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflect">reflecting</a> <var>contentAttribute</var> on <var>element</var>, given <var>value</var>.
Note: In practice, this means that, e.g., the `reflectsAriaAtomic` IDL on `ShadowRoot` reflects the `reflectsariaatomic` content attribute; etc
## ShadowRootExtInit
<pre class="idl">
[Exposed=Window]
dictionary ShadowRootExtInit: ShadowRootInit {
boolean reflectsAriaDescribedBy = false;
boolean reflectsAriaAtomic = false;
boolean reflectsAriaAutoComplete = false;
boolean reflectsAriaBusy = false;
boolean reflectsAriaChecked = false;
boolean reflectsAriaColCount = false;
boolean reflectsAriaColIndex = false;
boolean reflectsAriaColIndexText = false;
boolean reflectsAriaColSpan = false;
boolean reflectsAriaCurrent = false;
boolean reflectsAriaDescription = false;
boolean reflectsAriaDisabled = false;
boolean reflectsAriaExpanded = false;
boolean reflectsAriaHasPopup = false;
boolean reflectsAriaHidden = false;
boolean reflectsAriaInvalid = false;
boolean reflectsAriaKeyShortcuts = false;
boolean reflectsAriaLabel = false;
boolean reflectsAriaLevel = false;
boolean reflectsAriaLive = false;
boolean reflectsAriaModal = false;
boolean reflectsAriaMultiLine = false;
boolean reflectsAriaMultiSelectable = false;
boolean reflectsAriaOrientation = false;
boolean reflectsAriaPlaceholder = false;
boolean reflectsAriaPosInSet = false;
boolean reflectsAriaPressed = false;
boolean reflectsAriaReadOnly = false;
boolean reflectsAriaRequired = false;
boolean reflectsAriaRoleDescription = false;
boolean reflectsAriaRowCount = false;
boolean reflectsAriaRowIndex = false;
boolean reflectsAriaRowIndexText = false;
boolean reflectsAriaRowSpan = false;
boolean reflectsAriaSelected = false;
boolean reflectsAriaSetSize = false;
boolean reflectsAriaSort = false;
boolean reflectsAriaValueMax = false;
boolean reflectsAriaValueMin = false;
boolean reflectsAriaValueNow = false;
boolean reflectsAriaValueText = false;
};
</pre>
## attachShadow Signature
User agents MUST update the attachShadow method signature in the <code>Element</code> with the ShadowRootExtInit option, as the following:
<pre>
ShadowRoot attachShadow(ShadowRootExtInit init);
</pre>
## attachShadow Extension
<p>The `attachShadow` method steps have their last 2 steps with:
<ol>
<li><p>Set each attribute in the [[#reflects-correspondence]] table into <var>shadow</var> to the corresponding <var ignore="">init</var>[reflects attribute].
<li><p>Set <a>this</a>'s <a for=Element>shadow root</a> to <var>shadow</var>.
<li><p>Return <var>shadow</var>.
</ol>
### Reflects Aria Attribute Correspondence {#reflects-correspondence}
<table>
<thead>
<tr><th>Attribute</th><th>reflects</th></tr>
</thead>
<tbody>
<tr><td>reflects ariaDescribedBy</td><td>reflectsAriaDescribedBy</td></tr>
<tr><td>reflects ariaAtomic</td><td>reflectsAriaAtomic</td></tr>
<tr><td>reflects ariaAutoComplete</td><td>reflectsAriaAutoComplete</td></tr>
<tr><td>reflects ariaBusy</td><td>reflectsAriaBusy</td></tr>
<tr><td>reflects ariaChecked</td><td>reflectsAriaChecked</td></tr>
<tr><td>reflects ariaColCount</td><td>reflectsAriaColCount</td></tr>
<tr><td>reflects ariaColIndex</td><td>reflectsAriaColIndex</td></tr>
<tr><td>reflects ariaColIndexText</td><td>reflectsAriaColIndexText</td></tr>
<tr><td>reflects ariaColSpan</td><td>reflectsAriaColSpan</td></tr>
<tr><td>reflects ariaCurrent</td><td>reflectsAriaCurrent</td></tr>
<tr><td>reflects ariaDescription</td><td>reflectsAriaDescription</td></tr>
<tr><td>reflects ariaDisabled</td><td>reflectsAriaDisabled</td></tr>
<tr><td>reflects ariaExpanded</td><td>reflectsAriaExpanded</td></tr>
<tr><td>reflects ariaHasPopup</td><td>reflectsAriaHasPopup</td></tr>
<tr><td>reflects ariaHidden</td><td>reflectsAriaHidden</td></tr>
<tr><td>reflects ariaInvalid</td><td>reflectsAriaInvalid</td></tr>
<tr><td>reflects ariaKeyShortcuts</td><td>reflectsAriaKeyShortcuts</td></tr>
<tr><td>reflects ariaLabel</td><td>reflectsAriaLabel</td></tr>
<tr><td>reflects ariaLevel</td><td>reflectsAriaLevel</td></tr>
<tr><td>reflects ariaLive</td><td>reflectsAriaLive</td></tr>
<tr><td>reflects ariaModal</td><td>reflectsAriaModal</td></tr>
<tr><td>reflects ariaMultiLine</td><td>reflectsAriaMultiLine</td></tr>
<tr><td>reflects ariaMultiSelectable</td><td>reflectsAriaMultiSelectable</td></tr>
<tr><td>reflects ariaOrientation</td><td>reflectsAriaOrientation</td></tr>
<tr><td>reflects ariaPlaceholder</td><td>reflectsAriaPlaceholder</td></tr>
<tr><td>reflects ariaPosInSet</td><td>reflectsAriaPosInSet</td></tr>
<tr><td>reflects ariaPressed</td><td>reflectsAriaPressed</td></tr>
<tr><td>reflects ariaReadOnly</td><td>reflectsAriaReadOnly</td></tr>
<tr><td>reflects ariaRequired</td><td>reflectsAriaRequired</td></tr>
<tr><td>reflects ariaRoleDescription</td><td>reflectsAriaRoleDescription</td></tr>
<tr><td>reflects ariaRowCount</td><td>reflectsAriaRowCount</td></tr>
<tr><td>reflects ariaRowIndex</td><td>reflectsAriaRowIndex</td></tr>
<tr><td>reflects ariaRowIndexText</td><td>reflectsAriaRowIndexText</td></tr>
<tr><td>reflects ariaRowSpan</td><td>reflectsAriaRowSpan</td></tr>
<tr><td>reflects ariaSelected</td><td>reflectsAriaSelected</td></tr>
<tr><td>reflects ariaSetSize</td><td>reflectsAriaSetSize</td></tr>
<tr><td>reflects ariaSort</td><td>reflectsAriaSort</td></tr>
<tr><td>reflects ariaValueMax</td><td>reflectsAriaValueMax</td></tr>
<tr><td>reflects ariaValueMin</td><td>reflectsAriaValueMin</td></tr>
<tr><td>reflects ariaValueNow</td><td>reflectsAriaValueNow</td></tr>
<tr><td>reflects ariaValueText</td><td>reflectsAriaValueText</td></tr>
</tbody>
</table>
<section id="index" class="appendix">
# Appendix
## Original Threads
- <a href="https://w3c.github.io/webcomponents-cg/#cross-root-aria">Public summary from WCCG</a>
- <a href="https://github.com/WICG/aom/issues/169">WICG/aom#169</a>
- <a href="https://github.com/WICG/aom/issues/107">WICG/aom#107</a>
- <a href="https://github.com/WICG/webcomponents/issues/917">WICG/webcomponents#917</a>
- <a href="https://github.com/WICG/webcomponents/issues/916">WICG/webcomponents#916</a>
</section>