Setting focus (Re: [Bulk] Re: [BECS] CSSS! - CSS script)

Andrew Fedoniouk wrote:

> Speaking about functions. set-focus() for example can be useful for 
> implementing <label for> functionality but for any type of element.

Setting focus to some element in a Web page is a bad idea. It means that 
the keyboard works differently depending on whether the page has a 
focusable element or not.

In a typical browser, keys like the arrows, the tab and the space bar 
navigate through the page. Some browsers offer even more handy keys, 
e.g. to jump to the next <Hn> element. It would be very confusing for a 
user if the keys worked in some pages and not in others.

It's different in an application (such as a "widget"). Whatever UIDL is 
used to design the (G)UI of that application, one would hope that it 
provides control over the initial focus.

CSS is meant for layout of documents, not for (G)UIs. The assumption 
behind style sheet languages is that the document viewer (browser) 
already has a UI and we neither need nor should interfere with that UI.

Turning CSS into a language that is both a style sheet language and a 
UIDL can only lead to an ugly language that is neither very well.



Bert
-- 
   Bert Bos                                ( W 3 C ) http://www.w3.org/
   http://www.w3.org/people/bos                               W3C/ERCIM
   bert@w3.org                             2004 Rt des Lucioles / BP 93
   +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Friday, 9 May 2008 09:41:43 UTC