mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-29 15:44:27 +00:00
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:
@@ -133,7 +133,7 @@ class WP_Widget_Archives 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 ) . '">';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class WP_Widget_Categories 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 ) . '">';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class WP_Widget_Meta 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 ) . '">';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class WP_Widget_Pages 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 ) . '">';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ class WP_Widget_Recent_Comments 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;
|
||||
$output .= '<nav role="navigation" aria-label="' . esc_attr( $aria_label ) . '">';
|
||||
$output .= '<nav aria-label="' . esc_attr( $aria_label ) . '">';
|
||||
}
|
||||
|
||||
$output .= '<ul id="' . esc_attr( $recent_comments_id ) . '">';
|
||||
|
||||
@@ -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 ) . '">';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ class WP_Widget_RSS 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 : __( 'RSS Feed' );
|
||||
echo '<nav role="navigation" aria-label="' . esc_attr( $aria_label ) . '">';
|
||||
echo '<nav aria-label="' . esc_attr( $aria_label ) . '">';
|
||||
}
|
||||
|
||||
wp_widget_rss_output( $rss, $instance );
|
||||
|
||||
@@ -102,7 +102,7 @@ class WP_Widget_Tag_Cloud 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 ) . '">';
|
||||
}
|
||||
|
||||
echo '<div class="tagcloud">';
|
||||
|
||||
Reference in New Issue
Block a user