This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28150 - state requirement for the <select> element more precisely/clearly
Summary: state requirement for the <select> element more precisely/clearly
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-06 05:58 UTC by Michael[tm] Smith
Modified: 2015-08-28 06:50 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2015-03-06 05:58:36 UTC
https://html.spec.whatwg.org/multipage/forms.html#the-select-element

To state one of the spec requirements for the <select> element more clearly, I suggest revising it to say this:

If a select element has a required attribute specified, does not have a multiple attribute specified, and *does not have a "sizes" attribute with a value greater than 1*, then the select element must have a placeholder label option.

The current language in the spec says this:

If a select element has a required attribute specified, does not have a multiple attribute specified, and *has a display size of 1*, then the select element must have a placeholder label option.

But the thing is, if the multiple attribute isn't specified, the only way to control the "display size" is by explicitly specifying the "size" attribute.

So for the case of stating this particular requirement, we might better dispense with indirectly stating it in terms of the abstract "display size" concept, and more precisely and clearly state it in terms of the concrete "size" attribute.
Comment 1 Ian 'Hixie' Hickson 2015-03-06 17:12:00 UTC
That seems like an abstraction violation.

What if one day we make something else change the display size?
Comment 2 Michael[tm] Smith 2015-06-02 00:30:37 UTC
(In reply to Ian 'Hixie' Hickson from comment #1)
> That seems like an abstraction violation.
> 
> What if one day we make something else change the display size?

OK, so let's either make it include the clarification inline:

"If a select element has a required attribute specified, does not have a multiple attribute specified, and has a display size of 1 (that is, it does not have a "sizes" attribute with a value greater than 1), then the select element must have a placeholder label option."

or make it a note that follows, like this:

"If a select element has a required attribute specified, does not have a multiple attribute specified, and *has a display size of 1*, then the select element must have a placeholder label option.

"Note: In practice, the requirement stated in the paragraph above can only apply when a select element does not have a "sizes" attribute with a value greater than 1 (since a select element can currently only have a display size of 1 if it does not have a "sizes" attribute with a value greater than 1)."

That way if/when we do ever actually make something else change the display size, then we can remove that inline clarification or the note.
Comment 3 Michael[tm] Smith 2015-08-28 04:32:02 UTC
I don't feel strongly about this to keep it open. I (or somebody) can re-raise it at github if we want to re-pursue it in the future.
Comment 4 Michael[tm] Smith 2015-08-28 06:50:58 UTC
See https://github.com/whatwg/html/pull/16