[whatwg] [wf2] no value selected for type=range

Anne van Kesteren fora at annevankesteren.nl
Mon Aug 1 04:59:36 PDT 2005

It is not 100% clear to me what no value selected means for type=range. Say we
have this example:

# <form method="get">
#  <p><input type="range" value="200">
#  <p><input type="submit">
# </form>

As the MIN and MAX attributes have default values it is clear that the specified
value is out or range. Should it fall back to its initial value which is defined
to  be equivalent to the value of the MIN attribute or should something else

See <http://whatwg.org/specs/web-forms/current-work/#no-value> and some
paragraphs above and below that.

# By default, all of these new types (except range), just like the types from
# HTML4, must have no value selected unless a default value in a valid format
# is provided using the value  attribute. If a value is specified but it is
# not in a format that is valid for the type (where the valid types are the
# same as the valid submission types described above) then the defaultValue
# DOM attribute has the specified value, but the control is left with no
# value selected.

If type=range is also excluded from the second sentence, which is the part that
is unclear to me, the user interface should probably show the specified value
as well although it is out of range and make it clear that it is not

Anne van Kesteren

More information about the whatwg mailing list