diff --git a/src/ui/public/angular-bootstrap/datepicker/day.html b/src/ui/public/angular-bootstrap/datepicker/day.html index e276eefa218c3..4d2bb57ffb0ae 100755 --- a/src/ui/public/angular-bootstrap/datepicker/day.html +++ b/src/ui/public/angular-bootstrap/datepicker/day.html @@ -15,7 +15,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="move(-1)" - tabindex="-1" > @@ -28,7 +27,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="toggleMode()" - tabindex="-1" > {{title}} @@ -37,7 +35,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="move(1)" - tabindex="-1" > @@ -74,7 +71,6 @@ ng-class="{'kuiDatePickerRowCellContent-isSelected': dt.selected, 'kuiDatePickerRowCellContent-isCurrent': dt.current, 'kuiDatePickerRowCellContent-isOtherMonth': dt.secondary}" ng-click="select(dt.date)" ng-disabled="dt.disabled" - tabindex="-1" > {{dt.label}} diff --git a/src/ui/public/angular-bootstrap/datepicker/month.html b/src/ui/public/angular-bootstrap/datepicker/month.html index b5ecf93317cff..165708ece3082 100755 --- a/src/ui/public/angular-bootstrap/datepicker/month.html +++ b/src/ui/public/angular-bootstrap/datepicker/month.html @@ -15,7 +15,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="move(-1)" - tabindex="-1" > @@ -28,7 +27,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="toggleMode()" - tabindex="-1" > {{title}} @@ -37,7 +35,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="move(1)" - tabindex="-1" > @@ -61,7 +58,6 @@ ng-class="{'kuiDatePickerRowCellContent-isSelected': dt.selected, 'kuiDatePickerRowCellContent-isCurrent': dt.current}" ng-click="select(dt.date)" ng-disabled="dt.disabled" - tabindex="-1" > {{dt.label}} diff --git a/src/ui/public/angular-bootstrap/datepicker/year.html b/src/ui/public/angular-bootstrap/datepicker/year.html index afb875145af1d..4d37a0d9e13c3 100755 --- a/src/ui/public/angular-bootstrap/datepicker/year.html +++ b/src/ui/public/angular-bootstrap/datepicker/year.html @@ -15,7 +15,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="move(-1)" - tabindex="-1" > @@ -28,7 +27,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="toggleMode()" - tabindex="-1" > {{title}} @@ -37,7 +35,6 @@ type="button" class="kuiDatePickerNavigationButton" ng-click="move(1)" - tabindex="-1" > @@ -61,7 +58,6 @@ ng-class="{'kuiDatePickerRowCellContent-isSelected': dt.selected, 'kuiDatePickerRowCellContent-isCurrent': dt.current}" ng-click="select(dt.date)" ng-disabled="dt.disabled" - tabindex="-1" > {{dt.label}} diff --git a/src/ui/public/directives/pretty_duration.js b/src/ui/public/directives/pretty_duration.js index c8f5725702383..24caa80442a82 100644 --- a/src/ui/public/directives/pretty_duration.js +++ b/src/ui/public/directives/pretty_duration.js @@ -22,13 +22,18 @@ module.directive('prettyDuration', function (config, quickRanges, timeUnits) { lookupByRange[frame.from + ' to ' + frame.to] = frame; }); + function setText(text) { + $elem.text(text); + $elem.attr('aria-label', `Current time range is ${text}`); + } + function stringify() { let text; // If both parts are date math, try to look up a reasonable string if ($scope.from && $scope.to && !moment.isMoment($scope.from) && !moment.isMoment($scope.to)) { const tryLookup = lookupByRange[$scope.from.toString() + ' to ' + $scope.to.toString()]; if (tryLookup) { - $elem.text(tryLookup.display); + setText(tryLookup.display); } else { const fromParts = $scope.from.toString().split('-'); if ($scope.to.toString() === 'now' && fromParts[0] === 'now' && fromParts[1]) { @@ -37,7 +42,7 @@ module.directive('prettyDuration', function (config, quickRanges, timeUnits) { if (rounded[1]) { text = text + ' rounded to the ' + timeUnits[rounded[1]]; } - $elem.text(text); + setText(text); } else { cantLookup(); } @@ -62,7 +67,7 @@ module.directive('prettyDuration', function (config, quickRanges, timeUnits) { } } }); - $elem.text(display.from + ' to ' + display.to); + setText(`${display.from} to ${display.to}`); } $scope.$watch('from', stringify); diff --git a/src/ui/public/kbn_top_nav/kbn_top_nav.html b/src/ui/public/kbn_top_nav/kbn_top_nav.html index 1c881f4d36d24..bda5662a9495d 100644 --- a/src/ui/public/kbn_top_nav/kbn_top_nav.html +++ b/src/ui/public/kbn_top_nav/kbn_top_nav.html @@ -14,7 +14,7 @@