Contenu connexe Similaire à Accessibility learnings (20) Accessibility learnings12. IniAal tesAng results - FAIL
• Images missing ALT tags
• Heading nesAng
• Use of bold where a header should be used
• Empty headings
• Empty links
• Link text does not describe target
• Color Contrast problems with the shade of green used in
backgrounds and buRons
• Content not properly located inside landmarks
• Iframe elements require proper names
• Embedded pdf documents embedding duplicate landmark areas
• No Skip NavigaAon
26. funcAons.php
//* Enable Genesis Accessibility Components
add_theme_support( 'genesis-accessibility',
array( '404-page', 'drop-down-menu', 'headings',
'rems', 'search-form', 'skip-links' ) );
27. style.css
/* ## 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;
}
28. style.css
/* ## Focus Items
--------------------------------------------- */
a:focus {
border:#8888ff solid 2px!important;
}
button:focus {
background-color:#3AA8A8;
}
29. style.css
/* ## 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;
}
31. style.css
/* Visually hidden items for assistive devices */
.visuallyhidden {
border: 0;
clip: rect(0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
33. style.css
/* Skip Links ---------------------------------------- */
.genesis-skip-link {
margin: 0;
}
.genesis-skip-link li {
height: 0;
width: 0;
list-style: none;
}
/* Display outline on focus */
:focus {
color: #333;
outline: #ccc solid 1px;
}
35. Move Footer widgets to landmark
//* Add aside landmark to footer widgets
function add_footer_widget_landmark_open() {
echo '<aside role="complementary" aria-label="Footer
Sidebar">';
}
add_action( 'genesis_before_footer' ,
'add_footer_widget_landmark_open' , 1 );
function add_footer_widget_landmark_close() {
echo '</aside>';
}
add_action( 'genesis_before_footer' ,
'add_footer_widget_landmark_close' , 99 );