Skip to content

Commit

Permalink
Accessibility: add aria-label on breadcrumbs (#1668)
Browse files Browse the repository at this point in the history
* Accessibility: add aria-label on breadcrumbs

* "breadcrumbs" -> "Breadcrumb"

* Localise breadcrumb aria-label

* Add escape and fix textdomain

* Use esc_attr__

Co-authored-by: Mike Jolley <mike.jolley@me.com>
  • Loading branch information
radex02 and mikejolley authored May 5, 2021
1 parent 4cd0f28 commit 68e0a91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/woocommerce/class-storefront-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function is_woocommerce_extension_activated( $extension = 'WC_Bookings' )
*/
public function change_breadcrumb_delimiter( $defaults ) {
$defaults['delimiter'] = '<span class="breadcrumb-separator"> / </span>';
$defaults['wrap_before'] = '<div class="storefront-breadcrumb"><div class="col-full"><nav class="woocommerce-breadcrumb">';
$defaults['wrap_before'] = '<div class="storefront-breadcrumb"><div class="col-full"><nav class="woocommerce-breadcrumb" aria-label="' . esc_attr__( 'breadcrumbs', 'storefront' ) . '">';
$defaults['wrap_after'] = '</nav></div></div>';
return $defaults;
}
Expand Down

0 comments on commit 68e0a91

Please sign in to comment.