Skip to content

Commit 5c66c1d

Browse files
authored
Merge pull request #936 from yannicka/feature/a11y
Accessibility: add some `aria-hidden`, `label`s...
2 parents 355bd71 + 1cfabd5 commit 5c66c1d

File tree

18 files changed

+27
-26
lines changed

18 files changed

+27
-26
lines changed

modules/ps_emailsubscription/views/templates/hook/ps_emailsubscription.tpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
</div>
1818
{/if}
1919
<div class="d-flex gap-2 align-items-center mb-2">
20-
<input class="form-control flex-grow-1" type="email" name="email" value="{$value}" placeholder="{l s='Your email address' d='Modules.Emailsubscription.Shop'}" aria-label="{l s='Your email address' d='Modules.Emailsubscription.Shop'}" autocomplete="email" required />
20+
<label for="emailsubscription_input" class="visually-hidden">{l s='Your email address' d='Modules.Emailsubscription.Shop'}</label>
21+
<input class="form-control flex-grow-1" type="email" name="email" value="{$value}" placeholder="{l s='Your email address' d='Modules.Emailsubscription.Shop'}" id="emailsubscription_input" autocomplete="email" required />
2122
<input class="btn btn-primary" type="submit" name="submitNewsletter" value="{l s='Subscribe' d='Shop.Theme.Actions'}" aria-label="{l s='Subscribe to our newsletter' d='Modules.Emailsubscription.Shop'}" />
2223
</div>
2324
{capture name="display_gdpr_consent"}{hook h='displayGDPRConsent' id_module=$id_module}{/capture}

modules/ps_linklist/views/templates/hook/linkblock.tpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
{foreach $linkBlocks as $linkBlock}
77
<nav
88
class="ps-linklist footer-block col-md-6 col-lg-3"
9-
role="navigation"
109
aria-labelledby="footer_title_{$linkBlock.id}"
1110
>
1211
<p

modules/ps_searchbar/ps_searchbar.tpl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
<form class="ps-searchbar__form" method="get" action="{$search_controller_url}" role="search">
2929
<input type="hidden" name="controller" value="search">
3030
<i class="material-icons ps-searchbar__magnifier js-search-icon" aria-hidden="true">&#xE8B6;</i>
31+
<label for="ps_searchbar_input" class="visually-hidden">{l s='Search' d='Shop.Theme.Catalog'}</label>
3132
<input
3233
class="js-search-input form-control ps-searchbar__input"
3334
type="text"
3435
name="s"
3536
value="{$search_string}"
3637
placeholder="{l s='Search products...' d='Shop.Theme.Catalog'}"
37-
aria-label="{l s='Search' d='Shop.Theme.Catalog'}"
38+
id="ps_searchbar_input"
3839
autocomplete="off"
3940
role="combobox"
4041
aria-haspopup="listbox"
@@ -43,7 +44,7 @@
4344
aria-expanded="false"
4445
>
4546
<button type="button" class="ps-searchbar__clear js-search-clear btn outline outline--rounded d-none" aria-label="{l s='Clear search' d='Shop.Theme.Catalog'}">
46-
<i class="material-icons">&#xE14C;</i>
47+
<i class="material-icons" aria-hidden="true">&#xE14C;</i>
4748
</button>
4849
</form>
4950

@@ -69,7 +70,7 @@
6970
<div class="ps-searchbar--mobile d-md-none d-flex col-auto">
7071
<div class="header-block d-flex align-items-center">
7172
<a class="header-block__action-btn" href="#" role="button" data-bs-toggle="offcanvas" data-bs-target="#searchCanvas" aria-controls="searchCanvas" aria-label="{l s='Show search bar' d='Shop.Theme.Global'}">
72-
<span class="material-icons header-block__icon">&#xE8B6;</span>
73+
<span class="material-icons header-block__icon" aria-hidden="true">&#xE8B6;</span>
7374
</a>
7475
</div>
7576

templates/catalog/_partials/active_filters.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<li class="filter-block">
1515
{l s='%1$s:' d='Shop.Theme.Catalog' sprintf=[$filter.facetLabel]}
1616
{$filter.label}
17-
<a class="js-search-link" href="{$filter.nextEncodedFacetsURL}"><i class="material-icons close">&#xE5CD;</i></a>
17+
<a class="js-search-link" href="{$filter.nextEncodedFacetsURL}"><i class="material-icons close" aria-hidden="true">&#xE5CD;</i></a>
1818
</li>
1919
{/block}
2020
{/foreach}

templates/catalog/_partials/facets.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939

4040
<span>
4141
<span class="navbar-toggler collapse-icons">
42-
<i class="material-icons add">&#xE313;</i>
43-
<i class="material-icons remove">&#xE316;</i>
42+
<i class="material-icons add" aria-hidden="true">&#xE313;</i>
43+
<i class="material-icons remove" aria-hidden="true">&#xE316;</i>
4444
</span>
4545
</span>
4646
</div>
@@ -68,7 +68,7 @@
6868
{elseif isset($filter.properties.color)}
6969
<span class="color" style="background-color:{$filter.properties.color}"></span>
7070
{else}
71-
<span {if !$js_enabled} class="ps-shown-by-js" {/if}><i class="material-icons rtl-no-flip checkbox-checked">&#xE5CA;</i></span>
71+
<span {if !$js_enabled} class="ps-shown-by-js" {/if}><i class="material-icons rtl-no-flip checkbox-checked" aria-hidden="true">&#xE5CA;</i></span>
7272
{/if}
7373
</span>
7474
{else}

templates/catalog/_partials/miniatures/product-quickview.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<button class="{$componentName}__quickview-touch btn btn-tertiary btn-square-icon js-quickview"
1313
data-ps-action="open-quickview"
1414
aria-label="{l s='Quick view %product_name%' sprintf=['%product_name%' => $product.name] d='Shop.Theme.Actions'}">
15-
<i class="material-icons">&#xE417;</i>
15+
<i class="material-icons" aria-hidden="true">&#xE417;</i>
1616
</button>
1717
{/block}

templates/catalog/_partials/product-add-to-cart.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
{** And render the availability message with icon *}
3232
<div class="product__availability-status {$availability_class}" aria-live="off" data-ps-ref="product-availability">
33-
<i class="product__availability-icon material-icons rtl-no-flip">&#x{$availability_icon};</i>
33+
<i class="product__availability-icon material-icons rtl-no-flip" aria-hidden="true">&#x{$availability_icon};</i>
3434

3535
<div class="product__availability-messages">
3636
<span class="visually-hidden">{l s='Product availability:' d='Shop.Theme.Global'}</span>

templates/catalog/_partials/product-cover-thumbnails.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
{block name='product_images_modal_button'}
7676
<button class="product__zoom btn btn-tertiary outline outline--rounded btn-square-icon" data-bs-toggle="modal" data-bs-target="#product-modal" aria-label="{l s='Open zoomed product image gallery' d='Shop.Theme.Global'}" title="{l s='Open zoomed product image gallery' d='Shop.Theme.Global'}">
77-
<i class="material-icons">&#xE8B6;</i>
77+
<i class="material-icons" aria-hidden="true">&#xE8B6;</i>
7878
</button>
7979
{/block}
8080
</div>

templates/catalog/product.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
href="{url entity='attachment' params=['id_attachment' => $attachment.id_attachment]}"
166166
aria-label="{l s='Download %attachment_name%' sprintf=['%attachment_name%' => $attachment.name] d='Shop.Theme.Actions'}"
167167
>
168-
<i class="material-icons">&#xE2C4;</i> {l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
168+
<i class="material-icons" aria-hidden="true">&#xE2C4;</i> {l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
169169
</a>
170170
</div>
171171
{/foreach}

templates/checkout/_partials/cart-detailed-product-line.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108

109109
<div class="product-line__item product-line__item--availability">
110110
<div class="product-line__item-availability-message {$availability_class}">
111-
<i class="product-line__item-availability-icon material-icons rtl-no-flip">&#x{$availability_icon};</i>
111+
<i class="product-line__item-availability-icon material-icons rtl-no-flip" aria-hidden="true">&#x{$availability_icon};</i>
112112
{$product.availability_message}
113113
</div>
114114
</div>

0 commit comments

Comments
 (0)