W3C home > Mailing lists > Public > public-html@w3.org > December 2007

Re: Underline element.

From: Patrick H. Lauke <redux@splintered.co.uk>
Date: Fri, 28 Dec 2007 02:59:14 +0000
Message-ID: <47746682.1020000@splintered.co.uk>
To: public-html@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:11 GMT