The issue of the focus pseudo-class came up a few weeks ago, and I
finally got around to trying it out (better late than never ...)
The recommended order given for the pseudo-classes is link, visited,
focus, hover, active. However:
- Mozilla doesn't seem to do anything with the active rule;
- IE gets things wrong as usual: it uses the active rule for focus; it
ignores the focus rule;
- Opera ignores both focus and active rules and substitutes its own
highlighting. (Perhaps a good decision as it results in consistency
across sites and makes it easier to see where one is.)
I'm not convinced that the active pseudo-class does anything useful
anyway; or if it does why it should need a different colour from focus.
I would suggest therefore that the pragmatic order for specifying the
pseudo-classes would be:
A:link
A:visited
A:active, A:focus /* in other words: IE focus, Gecko focus */
A:hover
Or, if you still have some <A NAME=...> tags lying around for the
benefit of NN4:
A:link
A:visited
A:active, A:focus
A:link:hover, A:visited:hover
Comments?
--
Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/