Skip to content

Move Events reference as one article under DOM API #40443

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Josh-Cena
Copy link
Member

I know a lot of us have mixed feelings about the events reference, because it simply isn't supposed to be here. I'm merging everything into a single guide article, and next I will fix the broken anchors within in it (the current state gives me no appetite to modify this page).

@Josh-Cena Josh-Cena requested review from a team as code owners July 19, 2025 14:56
@Josh-Cena Josh-Cena requested review from fred-wang, estelle, wbamberg and pepelsbey and removed request for a team July 19, 2025 14:56
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs Content:Learn Learning area docs Content:Media Media docs Content:MathML MathML docs Content:Events Events docs Content:Firefox Content in the Mozilla/Firefox subtree Content:Meta Content in the meta docs labels Jul 19, 2025
@Josh-Cena Josh-Cena requested review from a team and removed request for fred-wang and estelle July 19, 2025 14:57
@github-actions github-actions bot added the size/l [PR only] 501-1000 LoC changed label Jul 19, 2025
Copy link
Contributor

github-actions bot commented Jul 19, 2025

Preview URLs (31 pages)
Flaws (43)

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

URL: /en-US/docs/Web/API/Document_Object_Model/Events
Title: DOM events
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/API/Document_Object_Model/Whitespace_in_the_DOM which is a redirect

URL: /en-US/docs/Web/HTML/Reference/Attributes
Title: HTML attribute reference
Flaw count: 35

  • broken_links:
    • Can't resolve /en-US/docs/Web/HTML/Reference/Attributes/alt
    • Can't resolve /en-US/docs/Web/HTML/Reference/Attributes/autoplay
    • Can't resolve /en-US/docs/Web/HTML/Reference/Attributes/cite
    • Can't resolve /en-US/docs/Web/HTML/Reference/Attributes/colspan
    • Can't resolve /en-US/docs/Web/HTML/Reference/Attributes/controls
    • and 30 more flaws omitted

URL: /en-US/docs/Web/MathML/Reference/Global_attributes
Title: MathML global attributes
Flaw count: 7

  • broken_links:
    • Can't resolve /en-US/docs/Web/MathML/Reference/Global_attributes/autofocus
    • Can't resolve /en-US/docs/Web/MathML/Reference/Global_attributes/class
    • Can't resolve /en-US/docs/Web/MathML/Reference/Global_attributes/data-*
    • Can't resolve /en-US/docs/Web/MathML/Reference/Global_attributes/id
    • Can't resolve /en-US/docs/Web/MathML/Reference/Global_attributes/nonce
    • and 2 more flaws omitted
External URLs (5)

URL: /en-US/docs/Web
Title: Web technology for developers


URL: /en-US/docs/Web/API/Document_Object_Model/Events
Title: DOM events

(comment last updated: 2025-07-26 13:30:37)

@sideshowbarker sideshowbarker removed the request for review from a team July 20, 2025 06:37
@bsmth
Copy link
Member

bsmth commented Jul 22, 2025

I think this is a great idea, so no objections from me.

@Josh-Cena
Copy link
Member Author

Anyone else we should consult?

@hamishwillee
Copy link
Collaborator

This is a good idea. I haven't reviewed the new events doc though, and won't unless requested.

Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Brian brought this to our internal team discussion and there was consensus to go ahead with this move. Thanks for this work! 🙌

I've left a few suggestions.

Do we need to capture the first para in https://developer.mozilla.org/en-US/docs/Web/Events/Event_handlers#what_are_the_available_events somewhere, maybe in a section before "See also" (I've suggested to add one) in the "DOM events" guide? Probably with a different heading that suggests where people can expect to find event documentation on MDN.

@@ -1,12 +1,15 @@
---
title: Event reference
title: DOM events
short-title: Events
Copy link
Contributor

Choose a reason for hiding this comment

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

looking at other items in the sidebar (some of which are pretty long!):

Suggested change
short-title: Events
short-title: Understanding events

or

Suggested change
short-title: Events
short-title: Working with events

Copy link
Member Author

Choose a reason for hiding this comment

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

This guide talks about the list of events, working with events, and the conceptual model of events. It sounds a bit of a stretch to make the title any more specific than just "Events". I agree we should shorten the other title though.

---

{{DefaultAPISidebar("DOM")}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to replace this macro as well with the sidebar in fm at some point. Looks like only 9 files will be impacted

Copy link
Member Author

@Josh-Cena Josh-Cena Jul 26, 2025

Choose a reason for hiding this comment

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

Looks like only 9 files will be impacted

Really? We do have a lot of DefaultAPISidebar usage. Last time we agreed to only do this when we could move the sidebar parameter to a separate api-group front matter.

@@ -530,4 +530,4 @@ A number of audio and video JavaScript libraries exist. The most popular librari
- [Web Audio API](/en-US/docs/Web/API/Web_Audio_API)
- [MediaStream Recording API](/en-US/docs/Web/API/MediaStream_Recording_API)
- [getUserMedia](/en-US/docs/Web/API/MediaDevices/getUserMedia)
- [Event reference: Media](/en-US/docs/Web/Events#media)
- [Event reference: Media](/en-US/docs/Web/API/Document_Object_Model/Events#media)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably be moved to the Guides section.

Also change to "DOM events"

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not too sure about that. The page is technically branded as a "guide", but this particular section feels much more "reference" than "guide". In the long term I'm not even sure if this hand-maintained table is sustainable, but for now I would just call it "Events index" and keep it as "reference".

Suggested change
- [Event reference: Media](/en-US/docs/Web/API/Document_Object_Model/Events#media)
- [Event index: Media](/en-US/docs/Web/API/Document_Object_Model/Events#media)

@Josh-Cena Josh-Cena requested a review from dipikabh July 26, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Events Events docs Content:Firefox Content in the Mozilla/Firefox subtree Content:HTML Hypertext Markup Language docs Content:Learn Learning area docs Content:MathML MathML docs Content:Media Media docs Content:Meta Content in the meta 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.

5 participants