[whatwg] Feeedback on <dfn>, <abbr>, and other elements

> From: Ian Hickson <ian at hixie.ch>
> Subject: Re: [whatwg] Feeedback on <dfn>, <abbr>, and other elements
> related to cross-references
> To: Calogero Alex Baldacchino <alex.baldacchino at email.it>
> Cc: WHAT Working Group <whatwg at lists.whatwg.org>
> Message-ID: <Pine.LNX.4.62.0811270041090.17401 at hixie.dreamhostps.com>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> On Thu, 27 Nov 2008, Calogero Alex Baldacchino wrote:
>>
>> Perhaps a silly idea: what if abbreviations could work as an img-map
>> couple? That is, i.e., an <abbr> without a title could avail of a, let's
>> say, 'ref' attribute indicating the id of a previous <abbr> element with
>> a title, and the former could be 'self-closing' (i.e. <abbr ref="#foo"
>> />), so by default the UA would substitute it with the referenced
>> element content (the unexpanded abbreviation), and, at the user will
>> (when he/she clics on the abbreviation, or just stops the pointer, or
>> navigates to the abbreviation, or according to any setting in the
>> browser options) the abbreviation is expanded. (I guess the above won't
>> be agreed because of backward compatibility, though)
>
> What problem would this solve? It's not like including the abbreviation
> each time is a great burden.
>

Actually, it would solve a problem like this:

What if I style abbr so that the title attribute is shown after the 
abbreviation:

abbr[title]:after {
   content: " ("attr(title)")";
}

Now obviously I don't need and don't want to do this for every instance of 
the abbreviation on the page visually (just the first one on each page would 
be enough) , but I do want the title attribute to be expanded for 
screenreaders on each instance.

Using this solution would enable the screenreaders to get the title 
information from a previous instance, but at the same time would not render 
it visually.

Bert

Received on Thursday, 27 November 2008 03:57:21 UTC