Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reference to OpenUICG Popup API #5

Merged
merged 3 commits into from
Jul 17, 2022
Merged

Add reference to OpenUICG Popup API #5

merged 3 commits into from
Jul 17, 2022

Conversation

Westbrook
Copy link
Owner

ARIA Attributes might not be the only ones we want to reflect here...

@mrego
Copy link

mrego commented Jul 4, 2022

Would also make sense to add an example related to <label for=input>?

For example if we have:

<x-label>
  <template shadowroot="open">
    <label id="mylabel1" for="myinput1">my label 1</label>
  </template>
</x-label>
<input id="myinput1" />

The relationship is not going to be set (because HTML spec mention they should be in the same tree). But also myinput1.labels won't have access to the things inside the shadow tree.

Or the other way around:

<label id="mylabel2" for="myinput2">my label 2</label>
<x-input>
  <template shadowroot="open">
    <input id="myinput2" />
  </template>
</x-input>

More discussion on label-input relationship at whatwg/html#3219.

@Westbrook
Copy link
Owner Author

@mrego checkout #3 where there is some of that.

@nolanlawson
Copy link

Hm, if we support popups, wouldn't we arguably want to support dialogs (e.g. the open attribute), details/summary (also an open attribute), etc.? Seems useful, but could get hairy. Maybe could be handled in a v2 of this API? 🙂

@mrego
Copy link

mrego commented Jul 6, 2022

Hm, if we support popups, wouldn't we arguably want to support dialogs (e.g. the open attribute), details/summary (also an open attribute), etc.? Seems useful, but could get hairy. Maybe could be handled in a v2 of this API? slightly_smiling_face

Not sure if I got what you mean by the open attribute, that attribute doesn't reference an element, it's a boolean one.

In the OpenUI popup proposal there are attributes like togglepopup, showpopup, and hidepopup; that point to another element (that element could be in a Shadow DOM and then reflection might be useful).

Is there anything similar with details/summary or dialog?

@nolanlawson
Copy link

Ah, my mistake; you're right! No, I can't think of any other element-referencing attributes.

@Westbrook
Copy link
Owner Author

I should also add reference back to the anchor attribute here, too.

@Westbrook Westbrook merged commit d089814 into main Jul 17, 2022
@Westbrook Westbrook deleted the popup-api branch July 17, 2022 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants