Improve accessibility by adding alternative text for screen-readers. (#11548)

* Ensure img elements have alt text where necessary (none do).
- Add aria-hidden to global nav icon.

* Remove unused title attribute from SavedObjectFinder.
This commit is contained in:
CJ Cenizal 2017-05-11 12:46:04 -07:00 committed by GitHub
parent 880648c9e3
commit c1b714e853
4 changed files with 6 additions and 6 deletions

View file

@ -25,7 +25,6 @@
<div class="list-group-item list-group-item--noBorder" ng-switch-when="visualization">
<saved-object-finder
title="Choose a visualization"
use-local-management="true"
type="visualizations"
on-add-new="opts.addNewVis"
@ -34,6 +33,10 @@
</div>
<div class="list-group-item list-group-item--noBorder" ng-switch-when="search">
<saved-object-finder title="Choose a search" type="searches" use-local-management="true" on-choose="opts.addSearch"></saved-object-finder>
<saved-object-finder
type="searches"
use-local-management="true"
on-choose="opts.addSearch"
></saved-object-finder>
</div>
</div>

View file

@ -34,7 +34,6 @@
<!-- Saved searches -->
<saved-object-finder
title="Saved Searches"
type="searches"
class="wizard-row visualizeWizardSavedObjectFinder kuiVerticalRhythm"
make-url="step2WithSearchUrl"

View file

@ -13,12 +13,11 @@
data-test-subj="appLink"
>
<div class="global-nav-link__icon">
<!-- Empty alt attribute is for accessibility -->
<img
ng-if="icon"
class="global-nav-link__icon-image"
kbn-src="{{ '/' + icon }}"
alt=""
aria-hidden
>
<span

View file

@ -15,7 +15,6 @@ module.directive('savedObjectFinder', function ($location, $injector, kbnUrl, Pr
restrict: 'E',
scope: {
type: '@',
title: '@?',
// optional make-url attr, sets the userMakeUrl in our scope
userMakeUrl: '=?makeUrl',
// optional on-choose attr, sets the userOnChoose in our scope