diff --git a/src/core_plugins/timelion/public/app.less b/src/core_plugins/timelion/public/app.less index 67dc712b4db589..fb90e17fa20668 100644 --- a/src/core_plugins/timelion/public/app.less +++ b/src/core_plugins/timelion/public/app.less @@ -152,7 +152,8 @@ timelion-interval { left:5px; line-height: 10px; - > div { + > .cell-action, + > .cell-id { display: inline-block; font-size: 10px; text-align: center; @@ -169,6 +170,10 @@ timelion-interval { .cell-action { opacity: 0; + + &:focus { + opacity: 1; + } } } @@ -188,6 +193,7 @@ timelion-interval { overflow-x: hidden; } +.ngLegendValue:focus, .ngLegendValue:hover { text-decoration: underline; } diff --git a/src/core_plugins/timelion/public/directives/cells/cells.html b/src/core_plugins/timelion/public/directives/cells/cells.html index 8c9dc1c3ccc39f..d1acf0e21b174e 100644 --- a/src/core_plugins/timelion/public/directives/cells/cells.html +++ b/src/core_plugins/timelion/public/directives/cells/cells.html @@ -9,15 +9,43 @@ timelion-grid timelion-grid-rows="state.rows" ng-click="onSelect($index)" ng-class="{active: $index === state.selected}" + kbn-accessible-click + aria-label="Timelion chart {{$index + 1}}" + aria-current="{{$index === state.selected}}" >
{{$index + 1}}
-
-
-
+ + +
diff --git a/src/core_plugins/timelion/public/directives/fullscreen/fullscreen.html b/src/core_plugins/timelion/public/directives/fullscreen/fullscreen.html index 8601937f83866f..0b5aab4093d465 100644 --- a/src/core_plugins/timelion/public/directives/fullscreen/fullscreen.html +++ b/src/core_plugins/timelion/public/directives/fullscreen/fullscreen.html @@ -1,8 +1,14 @@
-
+
+
diff --git a/src/core_plugins/timelion/public/directives/timelion_expression_input.html b/src/core_plugins/timelion/public/directives/timelion_expression_input.html index f53a26a7da51ad..01f92a0bf8a138 100644 --- a/src/core_plugins/timelion/public/directives/timelion_expression_input.html +++ b/src/core_plugins/timelion/public/directives/timelion_expression_input.html @@ -1,7 +1,16 @@ -
+
+ { + if(scope.functionSuggestions.isVisible && scope.functionSuggestions.index > -1) { + return `timelionSuggestion${scope.functionSuggestions.index}`; + } + return ''; + }; + init(); } }; diff --git a/src/core_plugins/timelion/public/directives/timelion_expression_input_helpers.js b/src/core_plugins/timelion/public/directives/timelion_expression_input_helpers.js index a90fd845730c0e..d660eb3656e5da 100644 --- a/src/core_plugins/timelion/public/directives/timelion_expression_input_helpers.js +++ b/src/core_plugins/timelion/public/directives/timelion_expression_input_helpers.js @@ -6,7 +6,7 @@ export class FunctionSuggestions { } reset() { - this.index = 0; + this.index = -1; this.list = []; this.isVisible = false; } @@ -14,9 +14,13 @@ export class FunctionSuggestions { setList(list) { this.list = list; - // We may get a shorter list than the one we have now, so we need to make sure our index doesn't - // fall outside of the new list's range. - this.index = Math.max(0, Math.min(this.index, this.list.length - 1)); + // Only try to position index inside of list range, when it was already focused + // beforehand (i.e. not -1) + if (this.index > -1) { + // We may get a shorter list than the one we have now, so we need to make sure our index doesn't + // fall outside of the new list's range. + this.index = Math.max(0, Math.min(this.index, this.list.length - 1)); + } } getCount() { diff --git a/src/core_plugins/timelion/public/directives/timelion_expression_suggestions/timelion_expression_suggestions.html b/src/core_plugins/timelion/public/directives/timelion_expression_suggestions/timelion_expression_suggestions.html index 5f080d2b7d5a7a..982d9472fa526a 100644 --- a/src/core_plugins/timelion/public/directives/timelion_expression_suggestions/timelion_expression_suggestions.html +++ b/src/core_plugins/timelion/public/directives/timelion_expression_suggestions/timelion_expression_suggestions.html @@ -1,19 +1,26 @@

.{{suggestion.name}}() - + {{suggestion.help}} {{suggestion.chainable ? '(Chainable)' : '(Data Source)'}} diff --git a/src/core_plugins/timelion/public/directives/timelion_interval/timelion_interval.html b/src/core_plugins/timelion/public/directives/timelion_interval/timelion_interval.html index de4aca963c78bf..bed82008688173 100644 --- a/src/core_plugins/timelion/public/directives/timelion_interval/timelion_interval.html +++ b/src/core_plugins/timelion/public/directives/timelion_interval/timelion_interval.html @@ -1,5 +1,6 @@ +> + + diff --git a/src/core_plugins/timelion/public/directives/timelion_interval/timelion_interval.js b/src/core_plugins/timelion/public/directives/timelion_interval/timelion_interval.js index 79e79fb573f452..7ea8b5c7247d09 100644 --- a/src/core_plugins/timelion/public/directives/timelion_interval/timelion_interval.js +++ b/src/core_plugins/timelion/public/directives/timelion_interval/timelion_interval.js @@ -15,6 +15,17 @@ app.directive('timelionInterval', function ($compile, $timeout) { template, link: function ($scope, $elem) { $scope.intervalOptions = ['auto', '1s', '1m', '1h', '1d', '1w', '1M', '1y', 'other']; + $scope.intervalLabels = { + 'auto': 'auto', + '1s': '1 second', + '1m': '1 minute', + '1h': '1 hour', + '1d': '1 day', + '1w': '1 week', + '1M': '1 month', + '1y': '1 year', + 'other': 'other' + }; $scope.$watch('model', function (newVal, oldVal) { // Only run this on initialization diff --git a/src/core_plugins/timelion/public/panels/timechart/schema.js b/src/core_plugins/timelion/public/panels/timechart/schema.js index 50e7bcb2a61b6b..1b05c6c0a94abb 100644 --- a/src/core_plugins/timelion/public/panels/timechart/schema.js +++ b/src/core_plugins/timelion/public/panels/timechart/schema.js @@ -63,7 +63,7 @@ export default function timechartFn(Private, config, $rootScope, timefilter, $co position: 'nw', labelBoxBorderColor: 'rgb(255,255,255,0)', labelFormatter: function (label, series) { - return '' + + return '' + label + ''; } diff --git a/src/core_plugins/timelion/public/partials/save_sheet.html b/src/core_plugins/timelion/public/partials/save_sheet.html index 68078c3a615a85..c96e3ef0270f5f 100644 --- a/src/core_plugins/timelion/public/partials/save_sheet.html +++ b/src/core_plugins/timelion/public/partials/save_sheet.html @@ -1,12 +1,12 @@
- +
@@ -24,7 +24,7 @@

Save entire Timelion sheet

- +
diff --git a/src/core_plugins/timelion/public/partials/sheet_options.html b/src/core_plugins/timelion/public/partials/sheet_options.html index ed30161dcf15f3..004f1db538599f 100644 --- a/src/core_plugins/timelion/public/partials/sheet_options.html +++ b/src/core_plugins/timelion/public/partials/sheet_options.html @@ -2,16 +2,18 @@
Sheet options
- +
- +