[whatwg] The IMG element, proposing a CAPTION attribute
news at terrainformatica.com
Mon Nov 20 22:54:02 PST 2006
----- Original Message -----
From: "Lachlan Hunt" <lachlan.hunt at lachy.id.au>
To: "Andrew Fedoniouk" <news at terrainformatica.com>
Cc: "WHAT WG List" <whatwg at whatwg.org>
Sent: Monday, November 20, 2006 9:39 PM
Subject: Re: [whatwg] The IMG element, proposing a CAPTION attribute
> Andrew Fedoniouk wrote:
>> E.g. the engine allows to define following:
>> <select id="color-selector">
>> <td role="option" value="#00FF00">...
>> <td role="option" value="#0000FF">...
>> to be able to define something like this:
> A better way to implement that without embedding presentational markup in
> the HTML would be to use an XBL template, bound to an ordinary select
> element. You could write all the markup you need to render the colour
> chooser or periodic table in the XBL <template>, which is populated by the
> values from the <option> elements. That has the advantage of providing
> better fallback in legacy UAs.
1) About that "presentational markup" sentence....
Semanticly speaking color table is a <table> and
periodic table is a <table> too.
This is exactly the case for what <table> was designed.
Think about accessibility and you will get an idea why <table> is better
in this case.
2) XBL is useless if your engine is not capable to do <popup>s in principle.
it is simply nothing to bind with for your data.
3) Lifecycle of popup element can be complex - XBL is not the best
thing to deal with this.
4) XBL is "the ability to map elements to script". Just add attribute
or "behavior" to the CSS and you will get almost perfect binding of
class of DOM elements to the class in script or code in other place.
More information about the whatwg