[webkit-dev] Request for position: Element/FrozenArray<Element> IDL attribute reflection

Andres Gonzalez andresg_22 at apple.com
Fri Apr 23 08:45:01 PDT 2021


There is some precedence for this mechanism already implemented in WebKit, e.g., aria-details and aria-errormessage. 

Best regards,

—Andres.


> On Apr 21, 2021, at 11:01 PM, Alice Boxhall via webkit-dev <webkit-dev at lists.webkit.org> wrote:
> 
> 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:
> 
> <label>
>   Phone number:
>   <input type="tel">
> </label>
> <span id="description">Please include international country code, e.g. +61</span>
> const input = document.querySelector('input');
> const description = document.getElementById('description');
> 
> input.ariaDescribedByElements = [description];
> You can read the more detailed explainer <https://github.com/WICG/aom/blob/gh-pages/element_reference_properties.md> for 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 <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 <https://github.com/WICG/aom/blob/gh-pages/element_reference_properties.md#note-on-element-array-property-equality> the self-equality part of the "Attributes should behave like data properties" <https://w3ctag.github.io/design-principles/#attributes-like-data> TAG design  principle.
> 
> Dominic Mazzoni (cc'd) is also participating in this design process, and will be able to answer any clarifying questions that might arise.
> 
> Thanks!
> 
> Alice
> 
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20210423/e782b6f9/attachment.htm>


More information about the webkit-dev mailing list