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

Ff133 dialog toggle beforetoggle events #36606

Merged

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Nov 1, 2024

FF133 adds support for <dialog> elements to respond to HTMLElement events toggle and beforetoggle.

This updates the docs to make it clear:

  • toggle fired on details element, dialog element, popovers
  • beforetoggle fired on dialog element, popovers (details to follow)

HTMLDetailsElement toggle event page removed as that event is actually HTMLElement toggle event fired on the details element.

Added/updated some examples to make it more clear

One problem is that the events are defined in HTMLElement onto other elements, so they aren't shown as part of those elements in the normal boilerplate - i.e. the list of events. I have mentioned the events in examples.
I have also added BCD entries for the target elements on the events, and will include those as compat data once/if those get accepted.

Related docs work #36536

@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs Content:Firefox Content in the Mozilla/Firefox subtree size/m [PR only] 51-500 LoC changed labels Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

Preview URLs (10 pages)
Flaws (4)

Note! 8 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Mozilla/Firefox/Releases/48
Title: Firefox 48 for developers
Flaw count: 3

  • broken_links:
    • Can't resolve /en-US/docs/Archive/Web/Old_Proxy_API
    • Can't resolve /en-US/docs/Mozilla/Projects/Social_API/Service_worker_API_reference
    • Can't resolve /en-US/docs/Mozilla/Gecko/Chrome/CSS/-moz-bool-pref

URL: /en-US/docs/Web/API/HTMLElement
Title: HTMLElement
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/HTMLElement/cancel_event does not exist
External URLs (1)

URL: /en-US/docs/Mozilla/Firefox/Releases/48
Title: Firefox 48 for developers

(comment last updated: 2024-11-14 23:31:14)

@github-actions github-actions bot added size/l [PR only] 501-1000 LoC changed and removed size/m [PR only] 51-500 LoC changed labels Nov 5, 2024
@hamishwillee hamishwillee marked this pull request as ready for review November 5, 2024 01:57
@hamishwillee hamishwillee requested review from a team as code owners November 5, 2024 01:57
@hamishwillee hamishwillee requested review from pepelsbey, wbamberg and chrisdavidmills and removed request for a team November 5, 2024 01:57
Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you :)

I'd suggest removing reversed layout from the demo and reversing the HTML instead. Reversed layout is always a potential accessibility issue. In this case, it also complicates the code for no reason.

files/en-us/web/api/htmldetailselement/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/htmldetailselement/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/htmlelement/toggle_event/index.md Outdated Show resolved Hide resolved
hamishwillee and others added 2 commits November 15, 2024 10:28
@hamishwillee
Copy link
Collaborator Author

Thanks @pepelsbey - I accepted all your suggestions. Note, I didn't consider the example much at all, but you're right it is better this way.

Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@pepelsbey pepelsbey merged commit a626007 into mdn:main Nov 15, 2024
9 checks passed
@hamishwillee hamishwillee deleted the ff133_dialog_toggle_beforetoggle_events branch November 16, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Firefox Content in the Mozilla/Firefox subtree Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants