General: Remove role="navigation" from nav elements.

Role="navigation" was required for assistive technology to recognize HTML5 element's native ARIA roles while HTML5 and ARIA were being introduced. With the deprecation of IE11, the role attribute is only required when mapping elements that don't have native role.

Props costdev, mukesh27.
Fixes #54054.

git-svn-id: https://develop.svn.wordpress.org/trunk@51967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2021-11-01 21:45:45 +00:00
parent 23b4388bab
commit 162fda69c8
35 changed files with 77 additions and 77 deletions

View File

@@ -103,7 +103,7 @@ class WP_Widget_Recent_Posts extends WP_Widget {
// The title may be filtered: Strip out HTML and make sure the aria-label is never empty.
$title = trim( strip_tags( $title ) );
$aria_label = $title ? $title : $default_title;
echo '<nav role="navigation" aria-label="' . esc_attr( $aria_label ) . '">';
echo '<nav aria-label="' . esc_attr( $aria_label ) . '">';
}
?>