Skip to content

Commit

Permalink
merge in timepicker.html changes from - Improve accessibility of the …
Browse files Browse the repository at this point in the history
…Datepicker. (elastic#11753)
  • Loading branch information
nreese committed Jun 2, 2017
1 parent 75f3552 commit 08cb009
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<form name="absoluteTime" ng-submit="applyAbsolute()">
<div class="kbn-timepicker-section">
<div>
<label class="small">From: <span ng-show="!absolute.from"><i>Invalid Date</i></span>
<a class="label label-default" ng-click="setToNow({key:'from'})">Set To Now</a>
<label class="small">From: <span ng-show="!absolute.from"><em>Invalid Date</em></span>
<a
class="label label-default"
ng-click="setToNow({key:'from'})"
kbn-accessible-click
>
Set To Now
</a>
</label>
<input type="text" required class="form-control" input-datetime="{{format}}" ng-model="absolute.from">
</div>
Expand All @@ -14,9 +20,15 @@
<div class="kbn-timepicker-section">
<div>
<label class="small">To:
<a class="label label-default" ng-click="setToNow({key:'to'})">Set To Now</a>
<a
class="label label-default"
ng-click="setToNow({key:'to'})"
kbn-accessible-click
>
Set To Now
</a>
</label>
<span ng-show="!absolute.to"><i>Invalid Date</i></span>
<span ng-show="!absolute.to"><em>Invalid Date</em></span>
<input type="text" required class="form-control" input-datetime="{{format}}" ng-model="absolute.to">
</div>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<div ng-repeat="list in quickLists" class="kbn-timepicker-section">
<ul class="list-unstyled">
<li ng-repeat="option in list">
<a ng-click="setQuick({from: option.from, to: option.to})" ng-bind="::option.display"></a>
<a
ng-click="setQuick({from: option.from, to: option.to})"
ng-bind="::option.display"
kbn-accessible-click
></a>
</li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
<label>
From:
<span ng-show="relative.from.preview">{{relative.from.preview}}</span>
<a class="label label-default" ng-click="setRelativeToNow({key:'from'})">Set To Now</a>
<span ng-hide="relative.from.preview"><i>Invalid Expression</i></span>
<a
class="label label-default"
ng-click="setRelativeToNow({key:'from'})"
kbn-accessible-click
>
Set To Now
</a>
<span ng-hide="relative.from.preview"><em>Invalid Expression</em></span>
</label>
<br>
<div class="form-group" ng-class="{ 'has-error': checkRelative() }">
Expand Down Expand Up @@ -47,8 +53,14 @@
<label>
To:
<span ng-show="relative.to.preview">{{relative.to.preview}}</span>
<a class="label label-default" ng-click="setRelativeToNow({key:'to'})">Set To Now</a>
<span ng-hide="relative.to.preview"><i>Invalid Expression</i></span>
<a
class="label label-default"
ng-click="setRelativeToNow({key:'to'})"
kbn-accessible-click
>
Set To Now
</a>
<span ng-hide="relative.to.preview"><em>Invalid Expression</em></span>
</label>
<br>
<div class="form-group" ng-class="{ 'has-error': checkRelative() }">
Expand Down

0 comments on commit 08cb009

Please sign in to comment.