Skip to content
New issue

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

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

Already on GitHub? # to your account

Edit article on HTMLDialogElement open attribute #38532

Merged

Conversation

AleksandrHovhannisyan
Copy link
Contributor

Description

  • Simplifies awkward wording on what the open attribute reflects
  • Adds a warning discouraging setting this attribute directly

Motivation

See linked issue #38508

Additional details

Related issues and pull requests

Fixes #38508

@AleksandrHovhannisyan AleksandrHovhannisyan requested a review from a team as a code owner March 8, 2025 20:43
@AleksandrHovhannisyan AleksandrHovhannisyan requested review from wbamberg and removed request for a team March 8, 2025 20:43
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Mar 8, 2025
A boolean value representing the state of the [`open`](/en-US/docs/Web/HTML/Element/dialog#open) HTML attribute. `true` means it is set, and therefore the dialog
is shown. `false` means it not set, and therefore the dialog is not shown.
A boolean value representing the state of the [`open`](/en-US/docs/Web/HTML/Element/dialog#open) HTML attribute. A value of `true` means that the dialog is showing, while `false` means it's not showing.
Copy link
Contributor Author

@AleksandrHovhannisyan AleksandrHovhannisyan Mar 8, 2025

Choose a reason for hiding this comment

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

The changes here are technically beyond the scope of the original issue, but I felt that the original wording was a bit verbose and inaccurate (both true and false are technically "set" values). Is this okay or should I split these changes into a separate issue/PR?

Copy link
Member

Choose a reason for hiding this comment

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

Including that in this PR is preferred

Copy link
Contributor

github-actions bot commented Mar 8, 2025

Preview URLs

Flaws (4)

Note! 1 document with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/HTML/Element/dialog
Title: <dialog>: The Dialog element
Flaw count: 4

  • broken_links:
    • /en-US/docs/Web/API/event/preventDefault is ill cased
    • /en-US/docs/Glossary/top_layer is ill cased
  • macros:
    • Macro produces link /en-US/docs/Web/API/event/preventDefault which is a redirect
    • Macro produces link /en-US/docs/Glossary/top_layer which is a redirect
External URLs (1)

URL: /en-US/docs/Web/API/HTMLDialogElement/open
Title: HTMLDialogElement: open property

(comment last updated: 2025-03-08 22:46:58)

AleksandrHovhannisyan and others added 2 commits March 8, 2025 15:39
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
@Josh-Cena Josh-Cena requested a review from a team as a code owner March 8, 2025 22:45
@Josh-Cena Josh-Cena requested review from estelle and removed request for a team March 8, 2025 22:45
@github-actions github-actions bot added the Content:HTML Hypertext Markup Language docs label Mar 8, 2025
Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Nice, thanks :)

@Josh-Cena Josh-Cena merged commit fbcc0f0 into mdn:main Mar 8, 2025
8 checks passed
@lukewarlow
Copy link
Contributor

Thanks!

@AleksandrHovhannisyan AleksandrHovhannisyan deleted the html-dialog-open-attribute branch March 9, 2025 00:07
# for free to join this conversation on GitHub. Already have an account? # 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.

Setting a dialog's open property manually should be strongly discouraged
3 participants