[whatwg] Status bars and progress indicators
ian at hixie.ch
Sun Nov 21 11:17:47 PST 2004
On Wed, 22 Sep 2004, Matthew Raymond wrote:
> > >
> > > <progressmeter value="86%">(86 %)</progressmeter>
> > >
> > > This is useful in two ways. First, it makes parsing bugs less
> > > likely because the browser doesn't have to process the child text.
> > But it makes UI bugs more likely because authors have to update two
> > values instead of one.
> As opposed to the author having to wonder how each UA is going to
> parse the child text. Or were we going to define in detail how to parse
> the text?
Surely that wouldn't be hard? Search for the first digit in .textContent,
read until you hit a non-numeric character, if it's a dot, read until the
next non-numeric character, search for the next number, repeat the
process. That results in two numbers that you can then use.
> > with the exception of "14 Percent", which I can't imagine anyone using
> > instead of "14 %". The parsing is simple: if there's only one number
> > in the contents, treat it as a percentage if "%" is present and as a
> > decimal fraction otherwise. And if there's more than one number in the
> > contents, treat the first two numbers as a fraction.
> <gage><img src="fourteen_percent.gif"></gage>
> <gage>14 x 1/100</gage>
> <gage>Points (Max. 100): 14</gage>
> <gage>14 Percentile</gage>
> <gage>[******* ]</gage>
> Why waste time creating rules for a parser to address all this when
> we can stick in one attribute to solve this. Browsers are already set up
> to read percents from attributes. Why complicate the browser's HTML
> parsing with something like this?
Because there are only half a dozen to a dozen UAs, which can implement
this without too much difficulty, and there are millions of potential
authors that want to use this, who are demonstrably lazier and less likely
to bother updating two pieces of text, leading to less accessible
documents with confusing, possibly wrong UI.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg