Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
Add accessibility label for reset button. Closes #591.
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidap committed Dec 4, 2017
1 parent 44f9d95 commit 443eeb4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/assets/js/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}

// Insert the icons
$searchFields.after('<span class="icon icon--close" data-form-search-clear></span>');
$searchFields.after('<span class="icon icon--close" data-form-search-clear><span class="sr-only">Clear</span></span>');
$('.form-search').append('<button class="icon icon--search icon--before"><span class="sr-only">Search</span></button>');

$('body').on('click', '[data-form-search-clear]', function () {
Expand Down
1 change: 1 addition & 0 deletions src/locales/de/styleguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ disclaimer:
link: http://www.disclaimer.admin.ch/terms_and_conditions.html
global-search:
title: Suche
reset: Zurücksetzen
nothing-found: Nichts gefunden.
1 change: 1 addition & 0 deletions src/locales/en/styleguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ disclaimer:
link: http://www.disclaimer.admin.ch/terms_and_conditions.html
global-search:
title: Search
reset: Reset
nothing-found: Nothing found.
1 change: 1 addition & 0 deletions src/locales/fr/styleguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ disclaimer:
link: http://www.disclaimer.admin.ch/terms_and_conditions.html
global-search:
title: Chercher
reset: Rétablir
nothing-found: Rien n'a été trouvé.
4 changes: 3 additions & 1 deletion src/views/layouts/includes/f-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ <h1>{{t 'styleguide.title'}}</h1>
<h2 class="sr-only">{{t 'styleguide.global-search.title'}}</h2>
<label for="webguiedelines-search-standard" class="sr-only">{{t 'styleguide.global-search.title'}}</label>
<input id="webguiedelines-search-standard" class="form-control search-input" type="text" placeholder="{{t 'styleguide.global-search.title'}}"/>
<span class="icon icon--close search-reset"></span>
<span class="icon icon--close search-reset">
<span class="sr-only">{{t 'styleguide.global-search.reset'}}</span>
</span>
<div class="search-results">
<div class="search-results-list"></div>
</div>
Expand Down

0 comments on commit 443eeb4

Please sign in to comment.