Merge pull request #649 from ericcornelissen/usability-noscript

Small usability improvement for users with JavaScript disabled (low priority)
This commit is contained in:
Johan Fagerberg 2017-10-22 20:49:26 +02:00 committed by GitHub
commit 5dd166d2d2

View File

@ -489,7 +489,7 @@
<div class="search">
<div class="search__wrapper">
<div class="search__close"><span>&times;</span></div>
<input type="text" placeholder="Search by brand …" />
<input type="text" placeholder="Search by brand …" title="Search not available when JavaScript is disabled" disabled />
</div>
</div>
<ul class="grid">
@ -543,6 +543,10 @@
$searchClose = $search.querySelector('.search__close'),
$searchInput = $search.querySelector('input');
// Remove the "disabled" attribute from the search input
$searchInput.setAttribute('title', 'Search Simple Icons');
$searchInput.removeAttribute('disabled');
// include a modified debounce underscorejs helper function.
// see
// - http://underscorejs.org/docs/underscore.html#section-83