[whatwg] [html5] Rendering of interactive content

Giovanni Campagna scampa.giovanni at gmail.com
Sat Feb 7 12:07:53 PST 2009


2009/2/7 Benjamin Hawkes-Lewis <bhawkeslewis at googlemail.com>

> On 7/2/09 18:51, Giovanni Campagna wrote:
>
>>    So the rendering section imposes *no* requirements on HTML5
>>    conforming user agents, therefore the spec is not "constraining the
>>    implementation of HTML5 on that of XBL2".
>>
>>
>> Yes, but UA that don't follow that set of CSS rules are not
>> interoperable with UA that follow, ie scripts must detect what
>> properties are ignored or defaulted.
>>
>
> HTML5 conforming UAs do not have to implement CSS or CSSOM.
>
> CSSOM-implementing UAs do not have to do express all styling with CSS
> properties.
>
> When they do, you can query for those properties via the CSSOM.
>

Yes, but what properties should I query for? Binding, behaviour, appearance,
border, color, font, all in once? And what should their values be?

>
>     Furthermore, user agents are free to use any method they like to
>>    mimic the suggested rendering, including CSS3 UI where applicable.
>>    They don't have to use BE CSS at all.
>>
>> They're "expected" to use CSS, and I expect that, according to html5,
>> "button { binding: initial; }" makes it like a <span>.
>>
>
> Is text I quoted not clear that the word "expected" is chosen precisely to
> make it clear that these are _not_ normative requirements? If so, could you
> suggest modifications to the text to make it even clearer?
>
>     If this is not obvious from the text, perhaps you would like to
>>    suggest a change to the text that would make it clearer?
>>
>> I don't agree with rendering being "optional". If interoperability is so
>> important (and it is), rendering should be normative.
>>
>
> How does that follow?


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.

>
>
> And what do you mean by "rendering should be normative"?
>
> Are you suggesting, for example, that HTML5 should mandate unvisited links
> be blue and underlined in the screen medium unless set otherwise by a
> publisher stylesheet? That would prevent UAs providing a default
> presentation of semantic HTML that suits the end-user!
>
> Note that would prevent UAs complying with W3C's user-agent accessibility
> guidelines:
>
> http://www.w3.org/TR/WAI-USERAGENT/guidelines.html#gl-user-control-styles


HTML5 should not mandate the UA present <a>s in blue, but it should mandate
the UA present <a>s like links (appearance:hyperlink). The color of course
is a matter of visual themes and platform.
An other example: HTML5 should mandate <button> displayed with
appearance:push-button; even if the UA doesn't support CSS.
Also compare it to the normative style sheet for XHTML2 [1]: it does not
require CSS, but it does require that some look and feel (very basic
actually) is enforced to express the semantics of elements.
Obviously this does not relate in any way with user preferences, here we
talk about UA defaults.

--
> Benjamin Hawkes-Lewis
>

Giovanni

[1] http://www.w3.org/TR/xhtml2/xhtml2-style.html#a_stylesheet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090207/6a14d23c/attachment.htm>


More information about the whatwg mailing list