W3C home > Mailing lists > Public > www-style@w3.org > November 2008

Re: [css3-selectors] Elements that can have :focus pseudo-class

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 17 Nov 2008 13:23:31 -0500
Message-ID: <4921B6A3.4090103@mit.edu>
To: Brad Kemper <brkemper.comcast@gmail.com>
CC: www-style@w3.org

Brad Kemper wrote:
> Yes, and my point is that, due to these beginnings, it is still common 
> to see window-related on* attributes in the BODY tag, and it is not 
> unusual for an HTML author to make a less nuanced distinction between 
> the BODY and the window object. So, rather than create a new simple 
> selector for WINDOW:focus or VIEWPORT:focus or whatever, it would be 
> pretty simple, natural, and understandable for authors to use BODY:focus 
> as a parallel to the still-in-use onfocus attribute there. Especially 
> considering that BODY:focus isn't otherwise useful for anything now.

1)  That doesn't address non-HTML languages.
2)  It has undefined behavior when there are multiple bodies (should
     they all match?)
3)  BODY:focus can easily be useful in a language that's not HTML
     and where the <body> tag indicates a focusable element.

-Boris
Received on Monday, 17 November 2008 18:24:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:17 GMT