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
reference IDs across shadow boundaries declaratively.
155
+
- ARIA IDL properties (`ariaDescribedByElements`, etc.) are the
156
+
intended replacement but have cross-root limitations. See
157
+
"Cross-Root ARIA Element Reflection" below for which directions
158
+
work and which silently fail.
159
+
- Verify relationships in the **ax tree**, not by inspecting DOM
160
+
attributes. A relationship that appears set in JS may produce
161
+
nothing in the computed tree.
162
+
- Flag any broken cross-root references and document workarounds
163
+
(live-region announcer, `aria-label` on trigger, Reference Target
164
+
when it ships).
165
+
- Ensure all ax tree states in demos are covered by a11ySnapshot
166
+
tests in the element's test files.
157
167
158
168
#### Cross-browser differences to flag
159
169
@@ -199,3 +209,125 @@ In "Critical Issues", all items should be linked to its WCAG success criterion..
199
209
- Leave "why comments" on non-obvious ARIA decisions
200
210
- Both browsers must produce functionally equivalent ax trees
201
211
- Test every state, not just default
212
+
213
+
## Cross-Root ARIA Element Reflection
214
+
215
+
Reference material for reviewing cross-shadow-boundary ARIA
216
+
relationships. Last updated June 2026.
217
+
218
+
### The Problem
219
+
220
+
Declarative ARIA ID references (`aria-describedby="some-id"`) only
221
+
resolve within a single DOM tree. Shadow DOM boundaries prevent
222
+
cross-root ID resolution. This affects any element where a trigger in
223
+
light DOM needs an ARIA relationship to content in shadow DOM (or
224
+
vice versa).
225
+
226
+
### ARIA IDL Element Reflection
227
+
228
+
The ARIA IDL properties (`ariaDescribedByElements`,
229
+
`ariaLabelledByElements`, `ariaControlsElements`, etc.) accept Element
230
+
references instead of ID strings, bypassing the ID-resolution problem.
231
+
However, cross-root references are validated by a **shadow-including
232
+
ancestors** algorithm that restricts which directions work.
233
+
234
+
#### Which directions work
235
+
236
+
| Direction | Example | Status |
237
+
|---|---|---|
238
+
| Same tree | Light DOM element → light DOM element | Works |
239
+
| Shadow-to-light (child→parent) | Shadow DOM element → light DOM ancestor | Works |
240
+
| Light-to-own-shadow (parent→child) | Light DOM trigger → shadow DOM content in same host | Permitted by spec algorithm, but **not WPT-tested** and **unreliable in practice**|
241
+
| Sibling shadow roots | Element in shadow root A → element in shadow root B | Does NOT work |
242
+
| Arbitrary cross-root | Unrelated shadow boundaries | Does NOT work |
243
+
244
+
The parent-to-child case (light DOM trigger referencing its host's
245
+
shadow DOM content) is technically valid per the shadow-including
246
+
ancestors rule, but:
247
+
248
+
- WPT tests at `custom-elements/element-internals-aria-element-reflection.html`
249
+
only cover same-tree and negative (invalid cross-tree) cases
250
+
-WICG/webcomponents#974 explored this direction with no clear resolution
251
+
- No browser has confirmed reliable support
252
+
- Treat as **progressive enhancement**: set the IDL property, but don't
253
+
rely on it for accessible content delivery
254
+
255
+
#### What to do instead
256
+
257
+
When a cross-root ARIA relationship silently fails, use one of these
258
+
workarounds depending on the element's semantics:
259
+
260
+
| Relationship | Workaround |
261
+
|---|---|
262
+
|`describedby` (supplementary text) | Static `role="status"` live-region announcer in light DOM (see ADVICE.md "Use a static live-region announcer") |
263
+
|`labelledby` (accessible name) | Set `aria-label` directly on the trigger element |
264
+
|`controls` (widget relationship) | Verify the ax tree reflects the relationship via native semantics (`<details>`, `<dialog>`) or ElementInternals; if not, document the gap |
265
+
|`none` (opt-out) | Provide a `silent` or similar boolean attribute to suppress ARIA behavior |
266
+
267
+
### Reference Target Proposal
268
+
269
+
The **Reference Target** proposal (WICG/webcomponents#1086) is the
270
+
long-term solution for cross-root ARIA. It enables external elements to
271
+
reference a shadow host by ID, with the shadow root designating which
272
+
internal element receives the reference via `shadowRootReferenceTarget`.
273
+
274
+
#### Status (June 2026)
275
+
276
+
| Browser | Status |
277
+
|---|---|
278
+
| Chrome | Canary behind `--enable-experimental-web-platform-features` flag. Intent to Experiment filed. Not in stable. |
0 commit comments