W3C home > Mailing lists > Public > public-html@w3.org > January to March 2007

Re: WF2 step attribute

From: Dave Raggett <dsr@w3.org>
Date: Sun, 25 Mar 2007 20:23:50 +0100 (BST)
To: Anne van Kesteren <annevk@opera.com>
cc: public-html@w3.org
Message-ID: <Pine.LNX.4.64.0703252016530.13072@localhost>

On Sun, 25 Mar 2007, Anne van Kesteren wrote:

> On Sun, 25 Mar 2007 20:28:30 +0200, Dave Raggett <dsr@w3.org> wrote:
>> The current WF2 spec says:
>>
>>  "For numeric controls, the default value
>>   of the step attribute is 1."
>> 
>> I think this is wrong.
>> 
>> For fields used to enter floating point numbers you can use the 
>> step attribute to specify a fixed precision, e.g. 0.01 for a 
>> number used for the price in dollars, but how do you indicate an 
>> infinitesimally small value with step without an ugly assumption 
>> about the precision the implementation is using to represent 
>> floating point numbers?
>> 
>> The spec should define the default for type="number" as an 
>> infinitesimally small value or we should consider introducing a 
>> new type such as type="float" if we want to retain 1 as the 
>> default for the case where numeric fields are most commonly used 
>> for integers.
>
> What's the use case?

What do you mean? Surely floating point numbers are sufficiently 
important that they need to be considered. Where would science and 
engineering be without floating point numbers? Scientists, engineers 
and students are increasingly dependent on the Web as a means to 
communicate with each other. Rich web applications must support 
floating point numbers.

We could either dispense with the default of step="1" for 
type="number" or we could introduce a new type for floating point 
numbers. I don't mind which choice is made between these two 
options, but the current wording in the specification is 
unnacceptable.

  Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
Received on Sunday, 25 March 2007 19:24:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 25 March 2007 19:24:14 GMT