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

Correct the information given for the "size" attribute #33598

Merged
merged 2 commits into from
May 18, 2024

Conversation

jGowgiel
Copy link
Contributor

@jGowgiel jGowgiel commented May 14, 2024

According to the current specification, the value of the "size" attribute is incorrectly identified here as greater than or equal to zero, when it should in fact be greater than zero.

The size attribute also has no specification links or compatibility data, which I am also addressing with an associated PR to mdn/browser-compat-data. I'll add a link to that PR as a comment here once it has been opened!

Description

Fix the information for the "size" attribute to properly state that the value should be strictly greater than zero, not greater than or equal to zero as stated currently.

I have also reworded and made the documentation for the "size" attribute more precise about what it indicates for input and select attributes, based on the HTML spec.

Motivation

I found this attribute and attempted to set it myself, based on the information given on MDN, and was flagged with an error from Angular when I attempted to set it to zero. According to the MDN documentation as it is currently written, 0 should be a valid value, so I went digging to see where the disconnect was. I'd like to prevent others from being similarly confused in the future!

Additional details

Relevant specifications:

According to the current specification, the value of the
"size" attribute is incorrectly identified here as greater
than or equal to zero, when it should in fact be greater
than zero.
@jGowgiel jGowgiel requested a review from a team as a code owner May 14, 2024 01:57
@jGowgiel jGowgiel requested review from dipikabh and removed request for a team May 14, 2024 01:57
@github-actions github-actions bot added the Content:HTML Hypertext Markup Language docs label May 14, 2024
@jGowgiel
Copy link
Contributor Author

Associated mdn/browser-compat-data PR: mdn/browser-compat-data#23085

Copy link
Contributor

github-actions bot commented May 14, 2024

Preview URLs

Flaws (1)

URL: /en-US/docs/Web/HTML/Attributes/size
Title: HTML attribute: size
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: html.elements.attribute.size

(comment last updated: 2024-05-14 02:02:31)

@jGowgiel
Copy link
Contributor Author

jGowgiel commented May 14, 2024

Flaws (1)
URL: /en-US/docs/Web/HTML/Attributes/size Title: HTML attribute: size Flaw count: 1

  • bad_bcd_queries:

    • No BCD data for query: html.elements.attribute.size

RE: the flaw reported here that there is no BCD data - this should be resolved with the PR I linked in an earlier comment to mdn/browser-compat-data 👍

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.

Thank you! 🎉

@estelle estelle merged commit 3546b3c into mdn:main May 18, 2024
8 checks passed
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.

None yet

2 participants