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

<progress> element and attributes vs. content

From: Adrian Bateman <adrianba@microsoft.com>
Date: Fri, 14 Aug 2009 10:29:44 -0700
To: Smylers <Smylers@stripey.com>, "public-html@w3.org" <public-html@w3.org>
Message-ID: <9EF3B2C14D3B794EB33689E0E1BDFEEA3B20184BFC@NA-EXMSG-C120.redmond.corp.microsoft.com>
On Friday, August 14, 2009 6:07 AM, Smylers wrote:
> Ian Hickson writes:
> 
> > On Fri, 7 Aug 2009, Adrian Bateman wrote:
> >
> > > Personally, I'd prefer to remove the element content parsing and
> > > always make the progress bar rendering depend on the attributes.
> >
> > I guess we could do that; what do other people think?
> 
> When I gave a conference presention introducing HTML 5 the content
> parsing of <progress> was one of two points to get spontaneous applause
> from the audience (the other was the HTML 5 doctype).
> 
> The audience were programmers, so I guess the notion of 'don't repeat
> yourself' appealed -- not having to specify the same thing in both the
> fallback text and the attributes, and risking one being updated without
> the other.

The comment attributed to me was actually written by Henri but I do agree with it.
http://lists.w3.org/Archives/Public/public-html/2009Aug/0573.html

Is the progress element intended to draw a control and also show the contained text? I presume not. We often see the Windows progress/activity bar annotated with a percentage shown as text and I suspect developers will want to achieve something similar on the web.

If the progress element doesn't draw the contained text then web developers may often want the value in mark-up after the element. They will then have to deal with the case when the browser doesn't support the progress element, is showing the contents as fall-back text, and they don't want the text to display twice. I'm also concerned about how fragile the content parsing rules may turn out to be in practice.

I agree with Henri - I would also prefer to remove the content parsing and have the display based only on the attributes. I think the notion of only updating the content is a nice idea but may actually make things more complex in practice. If the progress element only depends upon the attributes, web developers can decide whether the control is just providing extra information (where it doesn't require any fall-back text) or whether then need to include fall-back. They can also decide whether they want the fall-back text to update with the progress control.

For example:

<div><progress value="10" max="100"></progress> 10% complete</div>

or

<div><progress value="10" max="100">10%</progress></div>

Cheers,

Adrian.
Received on Friday, 14 August 2009 17:32:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:43 GMT