Skip to content

[popup] Allow <div popup> as a shorthand for <div popup=popup> #514

Closed

Description

@zcorpan

https://open-ui.org/components/popup.research.explainer#html-content-attribute

A new content attribute, popup, controls both the top layer status and the dismiss behavior. There are several allowed values for this attribute:

  • popup=popup - A top layer element following “Popup” dismiss behaviors (see below).
  • popup=hint - A top layer element following “Hint” dismiss behaviors (see below).
  • popup=async - A top layer element following “Async” dismiss behaviors (see below).

The proposal for popups is now a global attribute instead of an element or a set of elements for popups, as discussed in #410 (comment)

For developer ergonomics, I suggest allowing the empty string as a valid value that is a synonym to popup. That is, these should be equivalent:

<div popup=popup></div>

<div popup></div>

Since popup=popup looks the same as a boolean attribute, developers may expect the short form popup to work.

There are some enumerated attributes in HTML where the empty string is a valid keyword: crossorigin, hidden, contenteditable, translate, preload, spellcheck.

cc @mfreed7

Activity

  1. gregwhitworth commented on May 3, 2022

    @gregwhitworth
    Member

    Closing as the boolean option is being discussed in 491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions