Re: foo {content:title} - a proposal

Leif, can¡¯t you already do what you¡¯re asking for with this syntax?

input:focus::after { content: attr(title); }

On Mar 13, 2013, at 3:42 AM, Steve Faulkner <faulkner.steve@gmail.com> wrote:

> Leif wrote:
>  
>> Motivation: Since the <label> example above isn¡¯t keyboard accessible
>> today, Steve is proposing to change the HTML5 spec.[1]
>> 
>> [1] http://lists.w3.org/Archives/Public/public-html/2013Mar/0084
> 
> Please note: 
> 
> I am only proposing a change to author advice/requirements to match current, foreseeable future and historical user agent implementation realities.
> 
> 
> 
> with regards
> 
> SteveF
> --
> HTML 5.1
> 
> 
> On 13 March 2013 05:55, Leif Halvard Silli <xn--mlform-iua.no@xn--mlform-iua.no.no> wrote:
>> Dear CSS Working Group,  (with CC to wai-xtech@w3.org)
>> 
>> According to HTML5, the title attribute in the following <label>
>> element example, applies to each of <label>¡¯s child elements as well:
>> 
>>   <label title="Advisory text.">
>>      <input type="text" />
>>      <span></span>
>>   </label>
>> 
>> Thus, imagine that, in order to display the title 'inside' the <input>
>> element, one could do this:
>> 
>>     input:focus::after { content:title; }
>> 
>> Or, more realistically (given all the problems with generated content
>> for void elements), that we could render the title inside the <span>
>> element, when <input> has focus:
>> 
>>     input:focus + span::before { content:title; }
>> 
>> Result, from CSS consumer¡¯s point of view:
>> 
>>   <label title="Advisory text.">
>>      <input type="text" />
>>      <span><::before>Advisory text</::before></span>
>>   </labebl>
>> 
>> Since all browsers have a method for knowing what each element¡¯s title
>> is, perhaps this proposal isn¡¯t so off?
>> 
>> Motivation: Since the <label> example above isn¡¯t keyboard accessible
>> today, Steve is proposing to change the HTML5 spec.[1]
>> 
>> [1] http://lists.w3.org/Archives/Public/public-html/2013Mar/0084
>> --
>> leif halvard silli
> 

Received on Wednesday, 13 March 2013 15:05:40 UTC