diff --git a/wp-content/themes/twentytwenty/404.php b/wp-content/themes/twentytwenty/404.php index 64c25039a9..7e7e0cdc6f 100644 --- a/wp-content/themes/twentytwenty/404.php +++ b/wp-content/themes/twentytwenty/404.php @@ -21,7 +21,7 @@ get_header(); __( '404 not found', 'twentytwenty' ), + 'aria_label' => __( '404 not found', 'twentytwenty' ), ) ); ?> diff --git a/wp-content/themes/twentytwenty/index.php b/wp-content/themes/twentytwenty/index.php index b3037b660d..fb0a5d809a 100644 --- a/wp-content/themes/twentytwenty/index.php +++ b/wp-content/themes/twentytwenty/index.php @@ -98,7 +98,7 @@ get_header(); __( 'search again', 'twentytwenty' ), + 'aria_label' => __( 'search again', 'twentytwenty' ), ) ); ?> diff --git a/wp-content/themes/twentytwenty/searchform.php b/wp-content/themes/twentytwenty/searchform.php index 2acf8308b8..428a513b5c 100644 --- a/wp-content/themes/twentytwenty/searchform.php +++ b/wp-content/themes/twentytwenty/searchform.php @@ -17,7 +17,11 @@ */ $twentytwenty_unique_id = twentytwenty_unique_id( 'search-form-' ); -$twentytwenty_aria_label = ! empty( $args['label'] ) ? 'aria-label="' . esc_attr( $args['label'] ) . '"' : ''; +$twentytwenty_aria_label = ! empty( $args['aria_label'] ) ? 'aria-label="' . esc_attr( $args['aria_label'] ) . '"' : ''; +// Backward compatibility, in case a child theme template uses a `label` argument. +if ( empty( $twentytwenty_aria_label ) && ! empty( $args['label'] ) ) { + $twentytwenty_aria_label = 'aria-label="' . esc_attr( $args['label'] ) . '"'; +} ?>
method="get" class="search-form" action="">