Skip to content

Instantly share code, notes, and snippets.

@studiopress
Last active June 12, 2019 16:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save studiopress/9727052cc06e5ef538e3 to your computer and use it in GitHub Desktop.
Save studiopress/9727052cc06e5ef538e3 to your computer and use it in GitHub Desktop.
Genesis Accessibility
/* ## Accessible Menu
--------------------------------------------- */
.menu .menu-item:focus {
position: static;
}
.menu .menu-item > a:focus + ul.sub-menu,
.menu .menu-item.sf-hover > ul.sub-menu {
left: auto;
opacity: 1;
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Enable Genesis Accessibility Components
add_theme_support( 'genesis-accessibility', array(
'404-page',
'drop-down-menu',
'headings',
'rems',
'search-form',
'skip-links',
) );
/* ## Screen reader text
--------------------------------------------- */
.screen-reader-text,
.screen-reader-text span,
.screen-reader-shortcut {
border: 0;
clip: rect(0, 0, 0, 0);
height: 1px;
overflow: hidden;
position: absolute !important;
width: 1px;
word-wrap: normal !important;
}
.screen-reader-text:focus,
.screen-reader-shortcut:focus,
.genesis-nav-menu .search input[type="submit"]:focus,
.widget_search input[type="submit"]:focus {
background: #fff;
box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
clip: auto !important;
color: #333;
display: block;
font-size: 1em;
font-weight: bold;
height: auto;
padding: 15px 23px 14px;
text-decoration: none;
width: auto;
z-index: 100000; /* Above WP toolbar. */
}
.more-link {
position: relative;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment