Re: Underline element.

Patrick H. Lauke wrote:
> 
> Andrew Fedoniouk wrote:
> 
>> There is one case that we use in UI for <u> - to mark shortcut 
>> combinations:
>>
>> <button><u>O</u>pen</button>
>>
>> We do have special behavior defined for the <u> element that
>> synthesizes button click event when user presses Ctrl-O
>> (for the button above).
>>
>> So this brings some semantic meaning to the element
>> but this is not what it was intended for of course.
> 
> Yes, you're basically defining some visual presentation of text, and 
> then redefining how it behaves. Maybe splitting hairs, but it's not 
> semantic meaning as such...it's presentation that you then hijack with 
> scripting.
> 
> A possibly more semantic way would be to define an @accesskey for the 
> button element, and then, since current UAs don't automatically do the 
> underlining, add that presentational aspect on top (incidentally, when 
> doing stuff like extensions for Firefox, this is automatically taken 
> care of - defining an @accesskey attribute on a XUL menuitem of 
> toolbarbutton results in the relevant letter being underlined in the UI).
> 

For human this markup:
   <button><u>O</u>pen</button>
plus associated behavior has clear semantic value and
   <button accesskey="^O">Open</button>
is just nothing - user simply has no clue about that accesskey.

Information that is unknown to particular person has
semantic value of zero for that person, isn't it?

-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Friday, 28 December 2007 05:43:54 UTC