W3C home > Mailing lists > Public > public-html@w3.org > September 2009

Re: Localized decimal separator for numbers in <meter> textContent

From: Elliott Sprehn <esprehn@gmail.com>
Date: Mon, 28 Sep 2009 04:15:36 -0400
Message-Id: <EE01FC06-F2B0-4786-9810-26984B1A8D63@gmail.com>
To: HTML WG <public-html@w3.org>
To cut myself off here, I did just find this <http://www.w3.org/Bugs/Public/show_bug.cgi?id=7278 

To quote Ian: "The idea is just to provide a basic fallback that will  
be acceptable in legacy browsers", but that's not really what the spec  

The spec says: "The *recommended* way of giving the value is to  
include it as contents of the element". (Emphasis mine)

So the spec recommends using the textContent to specify the value, the  
comment on the ticket seems to imply that's a last resort for legacy  
browsers and you should really use @value. Very few of the examples  
use @value though, further lending to the idea that it's best practice  
not to use it.

Perhaps the language of the spec needs fixing?

At the very least, could we get an example in that big examples  
section that uses a comma and @value?
    <!-- Localized with comma decimal separator -->
    <meter value="0.75">0,75</meter>

- Elliott

On Sep 28, 2009, at 3:38 AM, Elliott Sprehn wrote:

> Pardon if this has come up before, I searched the archive and didn't  
> see it.
> The format of numbers specified in the spec for the textContent of  
> <meter> says 0-9 and a . (FULL STOP) are the only allowed characters  
> but this is particularly nasty to countries that use a comma  
> instead. I'm pretty sure most of Europe uses a comma, and a  
> significant part of the rest of the world.
> ISO 31 also specifies that a comma may be used as a decimal separator.
> There's no ambiguity in allowing this, since the HTML5 spec forbids  
> 10,000cm meaning 10 thousand centimeters.
> Seems we should follow ISO here and allow "." OR ",", especially  
> when a lot of the sites that would potentially use this (ex. Amazon)  
> are localized, and since we allow a localized version of the % sign.
> - Elliott
Received on Monday, 28 September 2009 08:16:18 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:51 UTC