Skip to content

Commit

Permalink
Add aria-labels to date-picker buttons (Fix elastic#12634)
Browse files Browse the repository at this point in the history
  • Loading branch information
timroes committed Jul 6, 2017
1 parent 4d481a2 commit c89688b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ui/public/angular-bootstrap/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst

scope.title = [years[0].label, years[range - 1].label].join(' - ');
scope.rows = ctrl.split(years, 5);
scope.yearRange = ctrl.yearRange;
};

ctrl.compare = function(date1, date2) {
Expand Down
2 changes: 2 additions & 0 deletions src/ui/public/angular-bootstrap/datepicker/day.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
type="button"
class="kuiDatePickerNavigationButton"
ng-click="move(-1)"
aria-label="Previous month"
>
<span class="kuiIcon fa-chevron-left"></span>
</button>
Expand All @@ -35,6 +36,7 @@
type="button"
class="kuiDatePickerNavigationButton"
ng-click="move(1)"
aria-label="Next month"
>
<span class="kuiIcon fa-chevron-right"></span>
</button>
Expand Down
2 changes: 2 additions & 0 deletions src/ui/public/angular-bootstrap/datepicker/month.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
type="button"
class="kuiDatePickerNavigationButton"
ng-click="move(-1)"
aria-label="Previous year"
>
<span class="kuiIcon fa-chevron-left"></span>
</button>
Expand All @@ -35,6 +36,7 @@
type="button"
class="kuiDatePickerNavigationButton"
ng-click="move(1)"
aria-label="Next year"
>
<span class="kuiIcon fa-chevron-right"></span>
</button>
Expand Down
2 changes: 2 additions & 0 deletions src/ui/public/angular-bootstrap/datepicker/year.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
type="button"
class="kuiDatePickerNavigationButton"
ng-click="move(-1)"
aria-label="Previous {{yearRange}} years"
>
<span class="kuiIcon fa-chevron-left"></span>
</button>
Expand All @@ -35,6 +36,7 @@
type="button"
class="kuiDatePickerNavigationButton"
ng-click="move(1)"
aria-label="Next {{yearRange}} years"
>
<span class="kuiIcon fa-chevron-right"></span>
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/kbn_top_nav/kbn_top_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
class="kuiLocalDropdown"
ng-show="kbnTopNav.rendered"
>
<button class="kuiLocalDropdownCloseButton" ng-click="kbnTopNav.close()">
<button class="kuiLocalDropdownCloseButton" ng-click="kbnTopNav.close()" aria-label="Close">
<span class="kuiIcon fa-chevron-circle-up"></span>
</button>
<div id="template_wrapper">
Expand Down

0 comments on commit c89688b

Please sign in to comment.