Support » Themes and Templates » Question of ignorance implementing a:focus in child theme

  • Resolved Sharon Austin


    Hi, my understanding is that to ensure accessiblity for a:hover, one must include a:focus.

    This understanding is based on larcher’s thread a week earlier, and the awesome link provided in that thread:

    I’m using multisite, 3.5, with child themes (plural) of the twentytwelve theme.

    1. In the parent twentytwelve theme, there is this piece of code:
    a:focus {
    outline: thin dotted;
    section {
    display: block;

    The only other reference to “focus” that I can see in the parent theme is the following:

    /* Assistive text */
    .site .screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    .main-navigation .assistive-text:hover,
    .main-navigation .assistive-text:active,
    .main-navigation .assistive-text:focus {
    background: #fff;
    border: 2px solid #333;
    border-radius: 3px;
    clip: auto !important;
    color: #000;
    display: block;
    font-size: 12px;
    padding: 12px;
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 100000; /* Above WP toolbar */

    So my questions are these:

    1. Do I understand the css correctly in the parent theme in that the only feature in which “focus” is enabled is in the .main-navigation .assistive-text:focus ?

    2. If my understanding above is correct, then, to make a child theme better accessible through the addition of a:focus, is it true I need to find each instance of a:hover and add to it an instance of a:focus in the child theme’s style.css?

    I don’t mind at all taking the time and trouble to do this; for accessibility, it’s worth it. I just want to make sure I understand the situation before I launch into it.

    Thanks in advance to any insights you have on this.

Viewing 1 replies (of 1 total)
  • Okay, in the “I’m not a keen observer of the obvious” category, I got it to work, simply by adding the above components into the child theme, so that the parent’s a:focus characteristics are not wiped out by the child.

    Even better, by having those components in the child theme, we’re able to tailor the a:focus components on those parts of the web site likely to be needed by the users.

    Well! Amazing how these things occur to you at 2 in the morning! Marking this resolved!

Viewing 1 replies (of 1 total)
  • The topic ‘Question of ignorance implementing a:focus in child theme’ is closed to new replies.