Skip to content

Conversation

@Khogendrarupini
Copy link

This PR updates the

element documentation to reflect modern animation support.
The outdated text claiming that transitions cannot be animated has been replaced with updated guidance referencing ::details-content, which enables smooth animations as part of Baseline since September 2025.
Duplicate sentences were also removed for clarity.

💡 Motivation

Developers reading MDN were misled into believing that

cannot animate opens/closes.
This change ensures the documentation is accurate and helps readers understand how to animate
widgets using the new pseudo-element.

🔗 Related Issue

Fixes #42226

@Khogendrarupini Khogendrarupini requested a review from a team as a code owner December 5, 2025 07:17
@Khogendrarupini Khogendrarupini requested review from estelle and removed request for a team December 5, 2025 07:17
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs size/s [PR only] 6-50 LoC changed labels Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Khogendrarupini and others added 3 commits December 5, 2025 23:57
Thank you for the feedback. I’ve applied the suggested wording update.

Co-authored-by: Estelle Weyl <[email protected]>
Improved phrasing to avoid browser-support references and align with MDN editorial guidance.
The text now clearly describes what the ::details-content pseudo-element represents and how it can be used for smooth open/close animations within <details> elements.
…ly to submit buttons

Adds a note explaining that visible constraint-validation feedback for setCustomValidity() is only shown when used on <button type="submit">. Other button types update validity internally but do not display UI feedback. This improves clarity for developers and resolves confusion raised in issue mdn#42234.
@Khogendrarupini Khogendrarupini requested a review from a team as a code owner December 6, 2025 03:15
@Khogendrarupini Khogendrarupini requested review from sideshowbarker and removed request for a team December 6, 2025 03:15
@github-actions github-actions bot added the Content:WebAPI Web API docs label Dec 6, 2025
Comment on lines 19 to 20
> **Note:**
> Visible constraint-validation feedback is only displayed when the button is of type `submit`.
Copy link
Contributor

Choose a reason for hiding this comment

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

[mdn-linter] reported by reviewdog 🐶

Suggested change
> **Note:**
> Visible constraint-validation feedback is only displayed when the button is of type `submit`.
> **Note:**
> Visible constraint-validation feedback is only displayed when the button is of type `submit`.

setCustomValidity(string)
```

> **Note:**
Copy link
Contributor

Choose a reason for hiding this comment

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

[markdownlint] reported by reviewdog 🐶
error search-replace Custom rule [gfm-alert: Use the GFM syntax: https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN#notes_warnings_and_callouts] [Context: "column: 1 text:'> Note:'"]

Updated the sample code to assign result when done is true, since value is always undefined at that point, this ensures the example correctly displays the full accumulated stream output, matching the accompanying explanation.
@sideshowbarker sideshowbarker removed their request for review December 8, 2025 03:51
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

the original PR was limited to dialog.. The two added pages would be better in separate PRs as they are unrelated. It's best to keep a PR to a single topic; and it is totally fine to submit lots of PRs. ;)

setCustomValidity(string)
```

> [!NOTE]
Copy link
Member

Choose a reason for hiding this comment

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

This content should be on the HTML button element page, and the input button pages, rather than in the API page.

In the following simple example, a previously-created custom `ReadableStream` is read using a {{domxref("ReadableStreamDefaultReader")}} created using `getReader()`.
(see our [Simple random stream example](https://mdn.github.io/dom-examples/streams/simple-random-stream/) for the full code).
Each chunk is read sequentially and output to the UI, until the stream has finished being read, at which point we return out of the recursive function and print the entire stream to another part of the UI.
Each chunk is read sequentially and output to the UI, until the stream has finished being read, at which point we return out of the recursive function and display the accumulated stream output to another part of the UI.
Copy link
Member

Choose a reason for hiding this comment

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

entire is better understood than accumulated, especially for non-native speakers

para.textContent = value;
// Output the accumulated stream content instead of `value`,
// which is undefined when `done` is true.
para.textContent = result;
Copy link
Member

Choose a reason for hiding this comment

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

we can't update this without updating the live example: https://mdn.github.io/dom-examples/streams/simple-random-stream/ (which needs to have the work "simple" removed)

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

Labels

Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<display> docs say open/close cannot be animated; ::display-content (new) allows animation

2 participants