[whatwg] [WA1] <ol type=a> is semantic
lachlan.hunt at lachy.id.au
Wed Oct 12 09:38:24 PDT 2005
Ian Hickson wrote:
> On Wed, 12 Oct 2005, James Graham wrote:
>> <p>The correct answer is <ref target="#correct" />) All of the above</p>
> I like your idea. I don't know that there realy is a back-compat problem,
> we could just say that it accepts text content, so you could write:
> <p>The correct answer is <ref target="#correct">f</ref> All of the
> BTW I'd be tempted to suggest that the attribute on <ref> be for="" and
> that it take an IDREF rather than a URI,
I like that too. I was thinking something along the same lines when I
read the earlier posts in this thread, though (as you mentioned) I would
have used the for attribute as an IDREF instead.
I can, however, think of the following issues:
1. Can it only refer to a <li id="foo"> element? Are there any
use-cases for allowing it to refer to other elements?
2. What about <li>s in <ul> or non-<li> elements? What value would be
used, or should it just use the fallback content?
3. Assuming <ref> gets replaced with the value of the counter from the
target element, what happens if the counter has been removed with CSS
i.e. what's the default value? Should it just use the fallback
content provided in such cases?
4. Authors are likely to provide fallback content that is dependant upon
the presentation. i.e. Your example used "f", but assuming no
type="a" attribute and no CSS, the list item's counter will probably
display "6." instead.
It's probably not a serious issue, since users may be smart enough to
work out that "f" is the 6th letter, and thus refers to the 6th item.
More information about the whatwg