[whatwg] [html5] Rendering of interactive content

Benjamin Hawkes-Lewis bhawkeslewis at googlemail.com
Sat Feb 7 16:21:47 PST 2009


On 7/2/09 20:07, Giovanni Campagna wrote:
> Yes, but what properties should I query for?

In order to find out what, precisely?

> Binding, behaviour, appearance, border, color, font, all in once? And
> what should their values be?

Their values depend on user agent defaults (which may be anything), user 
preferences (which may be anything), user stylesheets (which may be 
anything), and publisher styles (which may be anything), as per the CSS 
cascade:

http://www.w3.org/TR/CSS21/cascade.html#cascade

In other words, the values cannot be known for sure until you query them.

Even if you mandated precise user agent defaults, the values still could 
not be known for sure until you queried them, because of user 
preferences, user stylesheets, and publisher styles.

> If <input type="submit"> in some UA is rendered with all properties set
> to initial, not only it does not express the semantic of a button, but
> it may be difficult for a user to actually recognize it as a button and
> eventually click it.
> In that case I, as the author, may need to manually
> set { appearance:push-button; content:attr(value,string,"Send"); } in
> order to have my form submitted.
> Try this example (in Firefox or Safari):
> data:text/html,<style>label { position:fixed; top:-1em; border:1px solid
> black; } label input { -moz-appearance:none; -webkit-appearance:none;
> border:none; width:auto; } input[type=submit] { -moz-appearance:none;
> -webkit-appearance:none; background-color:transparent; border:none;
> }</style><form action="http://www.google.com/search"
> method="get"><label>Search: <input type="text" value=""
> name="q"></label><input type=submit value="Go">
>
> Imagine that was the UA default stylesheet instead of an author
> stylesheet and you may see what interoperability means with web
> application look and feel.

There's a recursion problem there.

User agents may derive the effects of "appearance" from user-agent 
default stylesheets:

http://www.w3.org/TR/css3-ui/#appearance

If the user agent default stylesheet does not style push buttons 
differently from other content, and the user agent derives the effects 
of appearance from that stylesheet, then checking or setting the value 
of appearance would not guarantee that your submit button would appear 
button-like.

> HTML5 should not mandate the UA present <a>s in blue, but it should
> mandate the UA present <a>s like links (appearance:hyperlink).

How would you test whether a UA complied with that requirement or not? 
Purely by testing the value of the appearance property applied to the 
element with a default configuration?

> Obviously this does not relate in any way with user preferences, here we
> talk about UA defaults.

What if a developer wants to create a UA reflecting a target market's 
differing preferences for presentation, rather than require the users to 
configure it first?

Are you proposing such a UA should be non-conforming?

--
Benjamin Hawkes-Lewis



More information about the whatwg mailing list