这是indexloc提供的服务,不要输入任何密码
Skip to content

[interest invokers] expected behavior when the interestfor link is broken #1240

@foolip

Description

@foolip

While working on whatwg/html#11006 a question has come up for me. When a button (or a or area) has full interest and target is showing, it's possible for a number of things to break or change the link between the invoker and the target element:

  • interestfor attribute changes so that either there is no target, or a new target
  • Similarly, the element with interestfor is moved or removed
  • The id attribute of the target changes so that either there is no target or another element (with the old ID but later in tree order) is the target
  • Similarly, the target is moved or removed

This is all similar to removing the open attribute from an open <dialog> element or removing a current fullscreen element, in that the change is immediate and one simply has to handle it synchronously as well as possible.

Testing https://codepen.io/foolip/pen/VYLJoje in Chrome Canary, this is the current behavior:

  • Removing the interestfor attribute makes both :has-interest and :target-of-interest stop matching, but leaves the popover open.
  • Removing the id attribute leaves :has-interest still matching, :target-of-interest not matching, and the popover open.

I think the behavior should be consistent and make none of the selectors match, but my main question is about the popover. Should it be left open, or should it be closed?

cc @mfreed7

Metadata

Metadata

Assignees

No one assigned

    Labels

    agenda+Use this label if you'd like the topic to be added to the meeting agendainterest-invokers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions