[webkit-dev] Request for position: Element/FrozenArray<Element> IDL attribute reflection
aboxhall at chromium.org
Wed Apr 21 20:01:17 PDT 2021
Hi WebKit engineers,
I've been working with Ryosuke Niwa and James Craig (and others) on
developing a design for a mechanism to allow setting and getting an Element
or a FrozenArray<Element> as the value for an IDL attribute which reflects
a content attribute which takes an IDREF or IDREF list.
As a short example, that would look like:
<input type="tel"></label><span id="description">Please include
international country code, e.g. +61</span>
const input = document.querySelector('input');const description =
input.ariaDescribedByElements = [description];
You can read the more detailed explainer
more in-depth examples and edge cases - please note that this explainer is
written for an audience of web content authors, and as such some of the
terminology doesn't precisely line up with spec terminology.
The current spec draft is here: https://github.com/whatwg/html/pull/3917
At this point, we have an implementation
<https://www.chromestatus.com/feature/6244885579431936> ready for developer
trial which matches the API described in the spec draft and explainer.
We're wondering what interest WebKit as a whole has in this API.
In particular, there is an open question
<https://github.com/whatwg/html/pull/3917#discussion_r603794547> as to
whether FrozenArray<Element> is a good choice, given validation constraints
(in part to avoid leaking Shadow DOM internals) mean that it violates
the self-equality part of the "Attributes should behave like data
Dominic Mazzoni (cc'd) is also participating in this design process, and
will be able to answer any clarifying questions that might arise.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev