Hey, Paul. Great post.
Just want to weigh in here, that unless there is a good reason not to, I think this is a good idea. I used ':focus' in a jQuery selector without giving it a second thought — it worked in the browsers I tested and I didn’t even think to check if jQuery officially supported :focus or not, because hey, it’s a legal CSS selector.
But one of our users, still on Firefox 3.0, complained that the site stopped working. Lo and behold, he gets an exception whenever we use :focus as a part of a selector in jQuery.
So backporting this to old browsers would absolutely be one fewer thing to worry about, as a developer.
I’m not terribly familiar with the core but clearly this would need optimized to use browser support whenever available if it’s faster than the document.activeElement test above.