Re: Underline element.

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).

P
-- 
Patrick H. Lauke
______________________________________________________________
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com
______________________________________________________________
Co-lead, Web Standards Project (WaSP) Accessibility Task Force
http://webstandards.org/
______________________________________________________________
Take it to the streets ... join the WaSP Street Team
http://streetteam.webstandards.org/
______________________________________________________________

Received on Friday, 28 December 2007 02:59:31 UTC