Lachlan Hunt wrote:
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?
Yes - numbered figures, numbered sections, numbered tables, etc.
Basically it should be tied to CSS counters (obviously if a UA supported
another styling language, it could use any provision that language has
for counters instead) and so the use case is "anywhere there's a CSS
counters use case".
2. What about <li>s in <ul> or non-<li> elements? What value would be
used, or should it just use the fallback content?
Fallback content as there's no counter here (I assume - I admit I
haven't read the CSS2.1 counters spec closely).
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?
Yes. On the other hand if the counter is just _hidden_ for some reason
then the <ref> should still use the computed value of the counter for
the element it points to.
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.
Of course that's already a problem.
--
"It seems to be a constant throughout history: In every period, people
believed things that were just ridiculous, and believed them so strongly
that you would have gotten in terrible trouble for saying otherwise."
-- http://www.paulgraham.com/say.html