mirror of
https://github.com/10h30/trestle.git
synced 2026-07-11 18:56:07 +09:00
Implement new accessibility updates with add_theme_support. Add mobile nav styling support
This commit is contained in:
@@ -29,6 +29,9 @@ function trestle_add_theme_support() {
|
|||||||
// Add support for footer widgets if specified in Trestle settings.
|
// Add support for footer widgets if specified in Trestle settings.
|
||||||
add_theme_support( 'genesis-footer-widgets', trestle_get_option( 'footer_widgets_number' ) );
|
add_theme_support( 'genesis-footer-widgets', trestle_get_option( 'footer_widgets_number' ) );
|
||||||
|
|
||||||
|
//* Add Accessibility support
|
||||||
|
add_theme_support( 'genesis-accessibility', array( 'headings', 'drop-down-menu', 'search-form', 'skip-links', 'rems' ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action( 'after_setup_theme', 'trestle_remove_genesis_css_enqueue' );
|
add_action( 'after_setup_theme', 'trestle_remove_genesis_css_enqueue' );
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
- Objects
|
- Objects
|
||||||
- Forms & Buttons
|
- Forms & Buttons
|
||||||
- Tables
|
- Tables
|
||||||
|
- Screen Reader Text
|
||||||
- Structure and Layout
|
- Structure and Layout
|
||||||
- Site Containers
|
- Site Containers
|
||||||
- Bubble Layout
|
- Bubble Layout
|
||||||
@@ -641,6 +642,81 @@ td {
|
|||||||
padding: 0.6rem 0;
|
padding: 0.6rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ## Screen reader text
|
||||||
|
--------------------------------------------- */
|
||||||
|
|
||||||
|
.screen-reader-text,
|
||||||
|
.screen-reader-text span,
|
||||||
|
.screen-reader-shortcut {
|
||||||
|
position: absolute !important;
|
||||||
|
clip: rect(0, 0, 0, 0);
|
||||||
|
height: 1px;
|
||||||
|
width: 1px;
|
||||||
|
border: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
color: #333;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen-reader-text:focus,
|
||||||
|
.screen-reader-shortcut:focus,
|
||||||
|
.genesis-nav-menu .search input[type="submit"]:focus,
|
||||||
|
.widget_search input[type="submit"]:focus {
|
||||||
|
clip: auto !important;
|
||||||
|
height: auto;
|
||||||
|
width: auto;
|
||||||
|
display: block;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 15px 23px 14px;
|
||||||
|
z-index: 100000; /* Above WP toolbar. */
|
||||||
|
text-decoration: none;
|
||||||
|
box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.more-link {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* # Skip Links
|
||||||
|
---------------------------------------------------------------------------------------------------- */
|
||||||
|
.genesis-skip-link li {
|
||||||
|
height: 0;
|
||||||
|
width: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ## Accessible Menu
|
||||||
|
--------------------------------------------- */
|
||||||
|
|
||||||
|
.menu .menu-item:focus {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu .menu-item > a:focus + ul.sub-menu,
|
||||||
|
.menu .menu-item.sfHover > ul.sub-menu {
|
||||||
|
left: auto;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* hide sub-menus */
|
||||||
|
ul.sub-menu,
|
||||||
|
.genesis-nav-menu [class*="current-"] > ul.sub-menu.open,
|
||||||
|
.genesis-nav-menu [class*="current_"] > ul.sub-menu.open {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.genesis-nav-menu ul.sub-menu.open,
|
||||||
|
.genesis-nav-menu ul.sub-menu.open {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* hide arrow indicators */
|
||||||
|
span.sf-sub-indicator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Structure and Layout
|
Structure and Layout
|
||||||
---------------------------------------------------------------------------------------------------- */
|
---------------------------------------------------------------------------------------------------- */
|
||||||
@@ -2212,6 +2288,13 @@ Media Queries
|
|||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* show sub-menus */
|
||||||
|
ul.sub-menu,
|
||||||
|
.genesis-nav-menu ul.sub-menu.open,
|
||||||
|
.genesis-nav-menu ul.sub-menu.open {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Header
|
/* Header
|
||||||
--------------------------------------------- */
|
--------------------------------------------- */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user