- From: Nolan Lawson <notifications@github.com>
- Date: Sat, 17 Dec 2022 09:57:37 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 17 December 2022 17:57:50 UTC
@annevk Thanks, you're right, I was not thinking this through clearly. A better example would be using `ariaDescribedByElements` instead: ```js class CustomElement extends HTMLElement { constructor() { super() const element = document.createElement('div') element.textContent = 'My description' this.attachShadow({ mode: 'closed' }).appendChild(element) this.attachInternals().ariaDescribedByElements = [element] } } ``` As for the `aria-describedby` IDREF, I agree it makes more sense for the ID search to happen within the document or shadow root containing the host element, since ElementInternals is attached to the host element, not the shadow root. (I also fixed my original example. `ariaDescribedBy` is not even a reflected property; my bad.) -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/974#issuecomment-1356354933 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/974/1356354933@github.com>
Received on Saturday, 17 December 2022 17:57:50 UTC