Add aria-current

See https://core.trac.wordpress.org/changeset/42808
This commit is contained in:
IanDelMar 2019-11-09 11:20:38 +01:00 committed by GitHub
parent c2a06502b7
commit c985f696ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -206,6 +206,8 @@ if ( ! class_exists( 'Understrap_WP_Bootstrap_Navwalker' ) ) {
} }
} }
$atts['aria-current'] = $item->current ? 'page' : '';
// update atts of this item based on any custom linkmod classes. // update atts of this item based on any custom linkmod classes.
$atts = self::update_atts_for_linkmod_type( $atts, $linkmod_classes ); $atts = self::update_atts_for_linkmod_type( $atts, $linkmod_classes );
// Allow filtering of the $atts array before using it. // Allow filtering of the $atts array before using it.