Hasty Briefsbeta

Bilingual

Targeting by Reference in the Shadow DOM

4 months ago
  • #Accessibility
  • #Web Development
  • #Shadow DOM
  • The author expresses skepticism about the Shadow DOM, citing accessibility issues.
  • A new proposal aims to fix problems with attributes like `for`, `popoverTarget`, and ARIA attributes in the Shadow DOM.
  • The proposal introduces `shadowRootReferenceTarget` to redirect references within Shadow DOM components.
  • Example provided shows how a label's `for` attribute can target an input inside a Shadow DOM using `shadowRootReferenceTarget`.
  • The feature can be enabled in Chrome and Safari via experimental flags.
  • The proposal benefits various attributes including form, list, popoverTarget, commandFor, and ARIA targeting attributes.
  • Feedback is encouraged via issue 1120 to improve the Shadow DOM's accessibility and utility.