[wp-trac] [WordPress Trac] #21324: Visible Focus within Admin Screens could be much clearer.
WordPress Trac
noreply at wordpress.org
Thu Oct 18 17:45:41 UTC 2012
#21324: Visible Focus within Admin Screens could be much clearer.
----------------------------+--------------------
Reporter: grahamarmfield | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.5
Component: Accessibility | Version: 3.4.1
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+--------------------
Comment (by azaozz):
Replying to [comment:49 lessbloat]:
> I spent a bit more time thinking about it this morning, and thought I'd
offer up another approach. 21324.13.diff still uses JS, but it simply adds
and removes a class (.clicked) to links on click, which seems much less
intrusive to me than forcing blur().
Ha, was just thinking/trying something similar yesterday night :)
The problem is how to distinguish between "tabbed to" links and "clicked"
links so we can highlight them when tabbing but not when clicking. Adding
a class on click that negates the "highlighting" styles seems like a good
way to do that.
Thinking we don't need to add/remove that class on each link. A simpler
solution would be to add/remove it on the body and then have:
{{{
<style>
body.tabbing a { ..do highlighting.. }
</style>
<script>
document.body.onclick = function(){ remove 'tabbing' class }
document.body.onkeydown = function(){ if ( tab key ) { add 'tabbing' class
} }
</script>
}}}
This is still JS driven but is a lot more subtle than blurring each <a> on
click. Still want to test/play a bit more with the idea.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21324#comment:50>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list