[whatwg] What it means for attributes of <input> to apply or not apply
eoconnor at apple.com
Wed Jun 22 08:50:50 PDT 2011
When adding the placeholder="" attribute to <input type=number>, one
of our engineers asked me about the behavior of content attributes that
don't apply to certain input types.
Consider for example <input type=range>. The spec says "[t]he
following content attributes *must not be specified* and *do not apply*
to the element: […] placeholder[…]" (emphasis mine). The first bit
("must not be specified") is clear: it's an authoring conformance
The second bit ("does not apply to the element"), however, isn't clear.
Is it a UA conformance requirement? What does it mean? I *think* it
means that the placeholder="" attribute has no effect on the rendering
of <input type=range>. Does it also mean that the placeholder="" content
attribute shouldn't be reflected as an IDL attribute on <input> elements
of type=range? In Safari 5, Firefox 4, and Opera 11, placeholder="" gets
reflected as an IDL attribute, regardless of the value of type="".
More information about the whatwg