Re: Implementor feedback on new elements in HTML5

Anne van Kesteren wrote:
> I believe date pickers is one of the more popular features (though 
> before it's going to be used there need to be more implementations), but 
> styling in Opera is currently not possible and authors do really want that.

I got feedback from Bruce Lawson, from our developer relations team, 
that every time he demos the date controls to people, he's always asked 
about how to style them.

The problem is that when they were designed, I believe they were 
designed with XBL in mind for restyling.  In theory that would allow 
developers to easily bind a nice, reusable template to the controls to 
visually replace them with whatever they like.  But this is dependent on 
browser support, which doesn't appear to be coming any time soon.  There 
is also the perception that XBL is very complex and authors want 
something really simple to address the the majority of cases.

Limited styling is already possible for border, background, font styles, 
text-align, margins, padding, etc.  But Bruce said the things that 
authors want to be able to style the most are:

* Change the icons used in the controls.

In Opera, our current implementation adds somewhat ugly icons to the 
email and url fields.  Authors don't like these and want to be able to 
provide their own, or use no icon.

I've seen authors fake this for other controls, particularly text boxes, 
using a background image or other similar technique.  One site I can 
recall is apple.com, which does this for the search field in browsers 
that don't support <input type=search results="">.

* Style and provide custom text for the error messages.

The error messages shown for client side validation currently aren't 
stylable, and authors want an easy way to do this that doesn't involve 
scripting.  This is currently only possibly by listening for the 
"invalid" event, calling preventDefault() and adding custom content to 
the DOM.  But this is overkill when they just want to make it look 
better, rather than override the whole native functionality.

Finally, this is not really a styling issue, but authors also want 
browsers to be able to provide more immediate feedback about control 
validity when the control loses focus, rather than waiting until the 
form is submitted.  This is currently possible using scripts and event 
listeners, but authors want easier, largely script free alternatives for 
developers who are good at HTML and CSS, but aren't so good at scripting.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Received on Tuesday, 1 September 2009 10:25:03 UTC