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

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  
says.

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?
ex.
    <!-- 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