Correct the information given for the "size" attribute #33598
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andselect
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: