Intent to Prototype: Popover invoker and anchor positioning improvements

137 views
Skip to first unread message

Mason Freed

unread,
Sep 4, 2024, 8:02:54 PMSep 4
to blink-dev

Contact emails

mas...@chromium.org

Explainer

None

Specification

https://github.com/whatwg/html/pull/9144#issuecomment-2195095228

Summary

This chromestatus represents the following related set of changes, which were resolved in https://github.com/whatwg/html/pull/9144#issuecomment-2195095228: 1. add an imperative way to set invoker relationships between popovers. 2. invoker relationships create implicit anchor element references.



Blink component

Blink>DOM

Motivation

The popovertarget attribute creates an "invoker" relationship between the invoking button and the popover. That does several things: - it creates nested popovers, if the invoking button is inside another popover. - it modifies the sequential focus navigation order, so that the invoked popover comes "next" in keyboard focus order. - it sets up aria-details and aria-expanded relationships between the invoker and the popover. There's currently no way to do these things via Javascript, and this chromestatus covers the addition of that functionality. Additionally, the implicit anchor element concept from anchor positioning (https://www.w3.org/TR/css-anchor-position-1/#implicit) is meant to be used by popovers. The original plan was, and still is, to add an `anchor` attribute or similar, to allow HTML to specify this type of relationship. But it was resolved in CSSWG/WHATWG to also create an implicit anchor reference via `popovertarget` and the new imperative API.



Initial public proposal

None

TAG review

None

TAG review status

Pending

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

No

Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5120638407409664?gate=5070152962670592

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages