diff --git a/wp-includes/class-walker-page.php b/wp-includes/class-walker-page.php index 398d1c8c57..3ade8b00df 100644 --- a/wp-includes/class-walker-page.php +++ b/wp-includes/class-walker-page.php @@ -158,8 +158,9 @@ class Walker_Page extends Walker { $args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before']; $args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after']; - $atts = array(); - $atts['href'] = get_permalink( $page->ID ); + $atts = array(); + $atts['href'] = get_permalink( $page->ID ); + $atts['aria-current'] = ( $page->ID == $current_page ) ? 'page' : ''; /** * Filters the HTML attributes applied to a page menu item's anchor element. @@ -169,7 +170,8 @@ class Walker_Page extends Walker { * @param array $atts { * The HTML attributes applied to the menu item's `` element, empty strings are ignored. * - * @type string $href The href attribute. + * @type string $href The href attribute. + * @type string $aria_current The aria-current attribute. * } * @param WP_Post $page Page data object. * @param int $depth Depth of page, used for padding. diff --git a/wp-includes/version.php b/wp-includes/version.php index f68e0cb644..3570a99479 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44415'; +$wp_version = '5.1-alpha-44416'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.