Re: Underline element.

Maciej Stachowiak wrote:
> 
> On Dec 27, 2007, at 6:42 PM, Andrew Fedoniouk wrote:
> 
>>
>> Ivan Enderlin wrote:
>>> Hi all :)
>>> I was reading the HTML 5 draft and something is strange about <u> tag.
>>> In HTML 4, <u> tag is depreciated [1], and <u> tag doesn't exist in 
>>> HTML 5 [2]. I don't find anymore informations about it in XHTML 1.0 
>>> or 1.1. So I deduce that we can't underlined an element in HTML right 
>>> now ?
>>> Best regards,
>>> -Ivan
>>> Notes :
>>>    [1] http://www.w3.org/TR/html4/present/graphics.html#edef-U ;
>>>    [2] http://www.whatwg.org/specs/web-apps/current-work/#phrase.
>>
>> 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.
> 
> Doing this results in platform-dependent UI. While on Windows using an 
> underlined character to indicate a keyboard shortcut is common, on Mac 
> OS X it is highly nonstandard UI. And platforms without a full keyboard 
> (such as mobile phones with only a numeric keypad, or touchscreen 
> devices like iPod touch that have only a virtual keyboard) would not 
> make use of keyboard shortcuts at all. So I don't think this is a very 
> good example.

Sorry, but platform-independent UI is one more unreachable dream of 
mankind. E.g. there are and will be OSes that may not support CUA [1].

E.g. proposed <header>, <footer> and <aside> cannot be presented in the
way their names tell us on most of mobile platforms (low-res or small 
screens). So <header> is not so platform-independent. So are "button > 
u", "input > u" and "option > u" elements.

I agree though that semantically <kbd> is better than <u> here.
Actually this use case is the only useful one I can imagine
for the <kbd> element.

--
Andrew Fedoniouk.
http://terrainformatica.com

[1] http://en.wikipedia.org/wiki/Common_User_Access

Received on Saturday, 29 December 2007 20:38:48 UTC