W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2008

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

From: Pentasis <pentasis@lavabit.com>
Date: Fri, 28 Nov 2008 14:26:05 +0200
Message-ID: <E7B34840FF9947CD89082EEFE8018E93@Sanktum01>
----- Original Message ----- 
From: "Calogero Alex Baldacchino" <alex.baldacchino@email.it>
To: "Pentasis" <pentasis at lavabit.com>
Cc: "WHAT Working Group" <whatwg at lists.whatwg.org>
Sent: Friday, November 28, 2008 2:54 AM
Subject: Re: [whatwg] Feeedback on <dfn>, <abbr>, and other elements


>>>>
>>>> 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.
>>
>>
>>
> I'm not sure I've understood your aim. In my "half-proposal" the '<abbr 
> ref=#foo />' element should/could be thought as inheriting the title 
> attribute (and the abbreviation content) from the referenced '<abbr 
> id="foo" title"Foo Bar" >FB</abbr>', thus your example would expand the 
> title for any #foo reference, and should be part of a 
> screenreader-targeted style sheet. Was this your purpose?
>

Ah, then I misunderstood. I thought you meant that only the first instance 
of an abbr would get a title and that any following instance would reference 
that like so:

..<abbr id="foo" title="for example">e.g.</abbr>.......<abbr 
href="#foo">e.g.</abbr>....

That way -I thought- one can retrieve the title attribute for other 
instances (via scripting?)

But as Ian pointed out, this can also be done through CSS. Even though I 
wonder if it is as flexible; authors -as opposed to designers- would 
probably find this HTML construct better to work with than a CSS file. This 
issue borders the question if CSS should be used for content manipulation 
(other than styling I mean). But I am not sure, so I won't argue on the 
subject.
But expanding on this idea, would it be beneficial to have some sort of 
property in CSS that enables us to arbitrarily inherit? In other words, to 
be able to have not only properties but also html-attributes inherit values 
from elements that are not directly in the lineage of inheritance?

Bert 
Received on Friday, 28 November 2008 04:26:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:07 UTC