[ADF-3115] a11y fixes (#3424)

* a11y fixes for search input

* a11y fixes for pagination

* a11y fixes for content actions
This commit is contained in:
Denys Vuika
2018-06-01 13:22:47 +01:00
committed by GitHub
parent f543b07082
commit 6909c459a8
5 changed files with 33 additions and 7 deletions

View File

@@ -59,6 +59,7 @@
<!-- Actions (left) -->
<div *ngIf="actions && actionsPosition === 'left'" class="adf-datatable-table-cell">
<button mat-icon-button [matMenuTriggerFor]="menu"
[title]="'ADF-DATATABLE.CONTENT-ACTIONS.TOOLTIP' | translate"
[attr.id]="'action_menu_left_' + idx"
[attr.data-automation-id]="'action_menu_' + idx">
<mat-icon>more_vert</mat-icon>
@@ -162,6 +163,7 @@
<div *ngIf="actions && actionsPosition === 'right'"
class="adf-datatable-table-cell alfresco-datatable__actions-cell">
<button mat-icon-button [matMenuTriggerFor]="menu"
[title]="'ADF-DATATABLE.CONTENT-ACTIONS.TOOLTIP' | translate"
[attr.id]="'action_menu_right_' + idx"
[attr.data-automation-id]="'action_menu_' + idx">
<mat-icon>more_vert</mat-icon>

View File

@@ -38,6 +38,12 @@
"YB": "YB"
},
"PAGINATION": {
"ARIA": {
"ITEMS_PER_PAGE": "Page size selector",
"CURRENT_PAGE": "Current page selector",
"PREVIOUS_PAGE": "Previous page button",
"NEXT_PAGE": "Next page button"
},
"ITEMS_RANGE": "Showing {{ range }} of {{ total }}",
"ITEMS_PER_PAGE": "Items per page",
"CURRENT_PAGE": "Page {{ number }}",
@@ -201,6 +207,9 @@
"TITLE": "Drag and drop",
"SUBTITLE": "to upload files"
}
},
"CONTENT-ACTIONS": {
"TOOLTIP": "Content actions"
}
},
"USER_PROFILE": {
@@ -271,7 +280,7 @@
"TEXT": "",
"URL": ""
},
"RETURN_BUTTON": {
"RETURN_BUTTON": {
"TEXT": "Back to home",
"ROUTE": "home"
}
@@ -283,7 +292,7 @@
"TEXT": "Report issue",
"URL": ""
},
"RETURN_BUTTON": {
"RETURN_BUTTON": {
"TEXT": "Back to home",
"ROUTE": "home"
}
@@ -295,7 +304,7 @@
"TEXT": "",
"URL": ""
},
"RETURN_BUTTON": {
"RETURN_BUTTON": {
"TEXT": "Back to home",
"ROUTE": "home"
}

View File

@@ -19,7 +19,10 @@
{{ pagination.maxItems }}
</span>
<button mat-icon-button [matMenuTriggerFor]="pageSizeMenu">
<button
mat-icon-button
[attr.aria-label]="'CORE.PAGINATION.ARIA.ITEMS_PER_PAGE' | translate"
[matMenuTriggerFor]="pageSizeMenu">
<mat-icon>arrow_drop_down</mat-icon>
</button>
@@ -40,6 +43,7 @@
<button
mat-icon-button
[attr.aria-label]="'CORE.PAGINATION.ARIA.CURRENT_PAGE' | translate"
[matMenuTriggerFor]="pagesMenu"
*ngIf="pages.length > 1">
<mat-icon>arrow_drop_down</mat-icon>
@@ -63,6 +67,7 @@
<button
class="adf-pagination__previous-button"
mat-icon-button
[attr.aria-label]="'CORE.PAGINATION.ARIA.PREVIOUS_PAGE' | translate"
[disabled]="isFirstPage"
(click)="goPrevious()">
<mat-icon>keyboard_arrow_left</mat-icon>
@@ -71,6 +76,7 @@
<button
class="adf-pagination__next-button"
mat-icon-button
[attr.aria-label]="'CORE.PAGINATION.ARIA.NEXT_PAGE' | translate"
[disabled]="isLastPage"
(click)="goNext()">
<mat-icon>keyboard_arrow_right</mat-icon>