Skip to content

Commit

Permalink
Refine use of aria-label in Dashboard panel and top nav, Discover, an…
Browse files Browse the repository at this point in the history
…d Management 'Edit index pattern' UI. (elastic#14341)
  • Loading branch information
cjcenizal committed Oct 11, 2017
1 parent b0671fd commit 83c13d6
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 12 deletions.
Expand Up @@ -23,7 +23,7 @@ exports[`DashboardPanel matches snapshot 1`] = `
class="kuiPopover kuiPopover--anchorRight dashboardPanelPopOver"
>
<span
aria-label="Click for more panel options"
aria-label="Panel options"
class="kuiButton__icon kuiIcon panel-dropdown fa fa-caret-down"
data-test-subj="dashboardPanelToggleMenuIcon"
role="button"
Expand Down
Expand Up @@ -74,7 +74,7 @@ export class PanelOptionsMenu extends React.Component {
const button = (
<KuiKeyboardAccessible>
<span
aria-label="Click for more panel options"
aria-label="Panel options"
className="kuiButton__icon kuiIcon panel-dropdown fa fa-caret-down"
data-test-subj="dashboardPanelToggleMenuIcon"
onClick={this.toggleMenu}
Expand Down
Expand Up @@ -5,7 +5,6 @@ exports[`renders DashboardCloneModal 1`] = `
class="kuiModalOverlay"
>
<div
aria-label="Clone a dashboard"
class="kuiModal dashboardCloneModal"
data-tests-subj="dashboardCloneModal"
>
Expand Down
Expand Up @@ -40,7 +40,6 @@ export class DashboardCloneModal extends React.Component {
<KuiModalOverlay>
<KuiModal
data-tests-subj="dashboardCloneModal"
aria-label="Clone a dashboard"
className="dashboardCloneModal"
onKeyDown={this.onKeyDown}
>
Expand Down
9 changes: 8 additions & 1 deletion src/core_plugins/kibana/public/discover/index.html
Expand Up @@ -8,7 +8,14 @@
<h1 tabindex="0" id="kui_local_breadcrumb" class="kuiLocalBreadcrumb">
<span ng-show="opts.savedSearch.id" class="kuiLocalBreadcrumb__emphasis">
<span data-test-subj="discoverCurrentQuery" ng-bind="opts.savedSearch.lastSavedTitle"></span>
<i id="reload_saved_search" tabindex="0" aria-label="Reload Saved Search" tooltip="Reload Saved Search" ng-click="resetQuery();" class="fa fa-undo small"></i>&nbsp;
<span
id="reload_saved_search"
aria-label="Reload Saved Search"
tooltip="Reload Saved Search"
ng-click="resetQuery()"
kbn-accessible-click
class="kuiIcon fa-undo small"
></span>&nbsp;
</span>
<span data-test-subj="discoverQueryHits" class="kuiLocalBreadcrumb__emphasis">{{(hits || 0) | number:0}}</span>
<ng-pluralize count="hits" when="{'1':'hit', 'other':'hits'}"></ng-pluralize>
Expand Down
Expand Up @@ -19,28 +19,30 @@
<button
ng-if="setDefault"
ng-click="setDefault()"
aria-label="Set as default index"
tooltip="Set as default index"
class="kuiButton kuiButton--basic"
data-test-subj="setDefaultIndexPatternButton"
>
<span class="sr-only">Set as default index</span>
<ispan
<span
aria-hidden="true"
class="kuiIcon fa-star"
></span>
</button>

<button
ng-if="refreshFields"
ng-click="refreshFields()"
aria-label="Reload field list"
tooltip="Refresh field list"
class="kuiButton kuiButton--basic"
>
<span class="sr-only">Reload field list</span>
<span
aria-hidden="true"
class="kuiIcon fa-refresh"
></span>
</button>

<button
ng-if="delete"
ng-click="delete()"
Expand All @@ -49,7 +51,6 @@
class="kuiButton kuiButton--danger"
data-test-subj="deleteIndexPatternButton"
>
<span class="sr-only">Remove index pattern</span>
<span
aria-hidden="true"
class="kuiIcon fa-trash"
Expand Down
@@ -1,15 +1,16 @@
<div class="actions">
<button
aria-label="Edit source filter"
aria-label="Edit"
ng-if="sourceFilters.editing !== filter"
ng-click="sourceFilters.editing = filter"
type="button"
class="kuiButton kuiButton--basic kuiButton--small"
>
<span aria-hidden="true" class="kuiIcon fa-pencil"></span>
</button>

<button
aria-label="Save source filter"
aria-label="Save"
ng-if="sourceFilters.editing === filter"
ng-click="sourceFilters.save()"
ng-disabled="!filter.value"
Expand All @@ -18,8 +19,9 @@
>
<span aria-hidden="true" class="kuiIcon fa-save"></span>
</button>

<button
aria-label="Delete source filter"
aria-label="Delete"
ng-click="sourceFilters.delete(filter)"
type="button"
class="kuiButton kuiButton--danger kuiButton--small"
Expand Down

0 comments on commit 83c13d6

Please sign in to comment.