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 mention of text selection prevention in inert attribute doc #33612

Merged
merged 3 commits into from
May 15, 2024

Conversation

amirhoseinsalimi
Copy link
Contributor

This commit adds information to the MDN documentation for the inert attribute, specifying that it prevents users from selecting text within the element. This behavior is described as similar to using the CSS property user-select: none to disable text selection. The commit includes a link to the documentation for the user-select CSS property for further reference. Fixes #33611.

Description

Added mention of text selection prevention to the documentation for the inert attribute, highlighting its similarity to using the user-select: none CSS property.

Motivation

These changes aim to enhance the clarity and completeness of the documentation for the inert attribute by providing information about its effect on preventing text selection. This addition helps readers understand the full range of behaviors associated with using the inert attribute and how it relates to CSS properties like user-select: none, improving their ability to use this attribute effectively in web development.

Additional details

The inert HTML element also prevents the users from selecting the text.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert

Related issues and pull requests

Fixes #33611

…tation

This commit adds information to the MDN documentation for the `inert` attribute, specifying that it prevents users from selecting text within the element. This behavior is described as similar to using the CSS property `user-select: none` to disable text selection. The commit includes a link to the documentation for the `user-select` CSS property for further reference. Closes mdn#33611.
@amirhoseinsalimi amirhoseinsalimi requested a review from a team as a code owner May 14, 2024 15:14
@amirhoseinsalimi amirhoseinsalimi requested review from estelle and removed request for a team May 14, 2024 15:14
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs size/xs 0-5 LoC changed labels May 14, 2024
Copy link
Contributor

github-actions bot commented May 15, 2024

Preview URLs

Flaws (1)

URL: /en-US/docs/Web/HTML/Global_attributes/inert
Title: inert
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/CSS/user-select does not exist

(comment last updated: 2024-05-15 03:22:46)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@sideshowbarker sideshowbarker merged commit 2f8e24c into mdn:main May 15, 2024
8 checks passed
@sideshowbarker
Copy link
Collaborator

Amir, nice work, and congrats on landing your first docs change here — welcome aboard 🎉

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 size/xs 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MDN inert Attribute Docs: Missing Info on Text Selection Prevention
2 participants