Fix filter bar clear filter button
Makes filter button screen reader friendly
and accessible.
- Adds icon directive for close icon
- Adds button type
- Icon is aria-hidden and uses an aria-label attribute with
the value set to clear filter
Tested:
- Filter inputs clear on close button click
Signed-off-by: Dixsie Wolmers <dixsiew@gmail.com>
Change-Id: Ifcbe603c2771156fe7a03359b144e0a0acd5e3f1
diff --git a/app/server-health/controllers/syslog-controller.html b/app/server-health/controllers/syslog-controller.html
index 6a5e8ea..9e04f49 100644
--- a/app/server-health/controllers/syslog-controller.html
+++ b/app/server-health/controllers/syslog-controller.html
@@ -34,7 +34,9 @@
<label for="content__search-input">Search</label>
<input id="content__search-input" type="text" ng-model="customSearch" ng-keydown="doSearchOnEnter($event)"/>
<div class="search-submit__wrapper">
- <button class="clear-input" ng-click="clear()">✕</button>
+ <button class="btn" type="button" aria-label="clear filter" ng-click="clear()">
+ <icon file="icon-close.svg" aria-hidden="true"></icon>
+ </button>
<input id="content__search-submit" type="submit" class="btn btn-primary content__search-submit" value="Filter" ng-click="doSearchOnClick()"/>
</div>
</div>