salcode / bootstrap-genesis

WordPress Genesis Child Theme setup to use Bootstrap, Sass, and Grunt
MIT License
184 stars 63 forks source link

Add Genesis accessibility features #151

Open salcode opened 8 years ago

salcode commented 8 years ago

See http://genesis-accessible.org/2015/07/genesis-2-2-accessibility-changes-and-features/

Ultimately, this is the code we want to add to lib/genesis-setup.php

add_theme_support(
    'genesis-accessibility', 
    array(
        'headings',
        'drop-down-menu',
        'search-form',
        'skip-links',
        'rems'
    ) 
);

though currently some of these features conflict with our existing styles or markup.

salcode commented 8 years ago

Since we're using Bootstrap Nav (rather than Genesis built-in nav) we don't need drop-down-menu.

bryanwillis commented 8 years ago

Since we're using Bootstrap Nav (rather than Genesis built-in nav) we don't need drop-down-menu.

the bs navwalker uses aria-haspopup accessibility features already so I'm pretty sure we could just edit it here with this this if we want to support the drop-down-menu feature:

if ( genesis_a11y( 'drop-down-menu' ) ) {
    $atts['aria-haspopup']  = 'true';
} 

also, not sure we can support rems until bs4 and 404 is also one of the features available