On not changing the keyboard focus in Web documents

I use my browsers to browse: I open a page, read some of it, follow a link to another page, read a bit more, etc. The browsers offer a number of tools to help with that: keys such as the arrows and the space bar allow to scroll the page, the slash starts incremental search, other keys and menu items allow to make bookmarks, save a page, duplicate the window, zoom in, tab to the next link or form control, copy and paste, etc. Some browsers also allow me to look up words in a dictionary, translate a page or part of it, view just the headings, etc.

Recently, Dominique Hazaël-Massieux wrote about automatically setting focus to form controls upon opening the page. There are unfortunately designers that do that. It is unfortunate, because when a form control has the focus, you cannot browse anymore. In other words, setting the focus frustrates the user's expectations.

This is one of the reasons I don't turn Javascript on in my browsers. Or use browsers without Javascript.

Setting the focus to an appropriate form control is a normal and desirable thing to do in an interactive application. This is thus another example of the confusion between documents and applications caused by “Dynamic HTML.”

Pages that open in a browser should act as documents, and applications should not open in a browser. The two types of user interaction cannot be combined in a single window.

HTML is not a UIDL, and many application written with the GUI expressed in HTML would improve (and be easier to maintain) if the authors used a real UIDL. Of course, there are programmers who prefer HTML, or only know HTML, and that is fine. However, such applications shouldn't be served by Web servers as “text/html,” which causes them to be opened in a browser, but as “application/widget.”

I think, and am optimistic, that this confusion of applications with documents is temporary.

There are very few applications that are only available as Javascript programs labeled as “text/html.” I run such programs in full screen mode in Opera. That has disadvantages (have to put other applications on another virtual screen, instead of side by side), but it hides the browser “chrome” and disables a number of browser commands that might interfere with the application.

I actually only use two such applications: Geoportail and Open Street Map. The latter can already almost be replaced by Marble. Unfortunately, I haven't found a program yet that replaces Geoportail.

Bert Bos
Created 25 November 2010