add aria-label attribute (#5138)

This commit is contained in:
Cilibiu Bogdan
2019-10-08 12:30:06 +03:00
committed by Eugenio Romano
parent e7bf3b5d56
commit 922e6ae3ab
3 changed files with 13 additions and 1 deletions

View File

@@ -326,7 +326,8 @@
"FIT_PAGE": "Fit page", "FIT_PAGE": "Fit page",
"ROTATE_LEFT": "Rotate left", "ROTATE_LEFT": "Rotate left",
"ROTATE_RIGHT": "Rotate right", "ROTATE_RIGHT": "Rotate right",
"RESET": "Reset" "RESET": "Reset",
"THUMBNAILS": "Document thumbnails"
}, },
"PAGE_LABEL": { "PAGE_LABEL": {
"SHOWING": "Showing", "SHOWING": "Showing",

View File

@@ -37,6 +37,8 @@
<ng-container *ngIf="allowThumbnails"> <ng-container *ngIf="allowThumbnails">
<button mat-icon-button <button mat-icon-button
[attr.aria-label]="'ADF_VIEWER.ARIA.THUMBNAILS' | translate"
[attr.aria-expanded]="showThumbnails"
data-automation-id="adf-thumbnails-button" data-automation-id="adf-thumbnails-button"
[disabled]="isPanelDisabled" [disabled]="isPanelDisabled"
(click)="toggleThumbnails()"> (click)="toggleThumbnails()">

View File

@@ -14,6 +14,7 @@
<button <button
mat-icon-button mat-icon-button
[attr.aria-expanded]="showLeftSidebar" [attr.aria-expanded]="showLeftSidebar"
[attr.aria-label]="'ADF_VIEWER.ACTIONS.INFO' | translate"
title="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}"
data-automation-id="adf-toolbar-left-sidebar" data-automation-id="adf-toolbar-left-sidebar"
[color]="showLeftSidebar ? 'accent' : 'default'" [color]="showLeftSidebar ? 'accent' : 'default'"
@@ -25,6 +26,7 @@
<button *ngIf="allowGoBack" <button *ngIf="allowGoBack"
class="adf-viewer-close-button" class="adf-viewer-close-button"
data-automation-id="adf-toolbar-back" data-automation-id="adf-toolbar-back"
[attr.aria-label]="'ADF_VIEWER.ACTIONS.CLOSE' | translate"
mat-icon-button mat-icon-button
title="{{ 'ADF_VIEWER.ACTIONS.CLOSE' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.CLOSE' | translate }}"
(click)="onBackButtonClick()"> (click)="onBackButtonClick()">
@@ -37,6 +39,7 @@
*ngIf="allowNavigate && canNavigateBefore" *ngIf="allowNavigate && canNavigateBefore"
data-automation-id="adf-toolbar-pref-file" data-automation-id="adf-toolbar-pref-file"
mat-icon-button mat-icon-button
[attr.aria-label]="'ADF_VIEWER.ACTIONS.PREV_FILE' | translate"
title="{{ 'ADF_VIEWER.ACTIONS.PREV_FILE' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.PREV_FILE' | translate }}"
(click)="onNavigateBeforeClick()"> (click)="onNavigateBeforeClick()">
<mat-icon>navigate_before</mat-icon> <mat-icon>navigate_before</mat-icon>
@@ -47,6 +50,7 @@
*ngIf="allowNavigate && canNavigateNext" *ngIf="allowNavigate && canNavigateNext"
data-automation-id="adf-toolbar-next-file" data-automation-id="adf-toolbar-next-file"
mat-icon-button mat-icon-button
[attr.aria-label]="'ADF_VIEWER.ACTIONS.NEXT_FILE' | translate"
title="{{ 'ADF_VIEWER.ACTIONS.NEXT_FILE' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.NEXT_FILE' | translate }}"
(click)="onNavigateNextClick()"> (click)="onNavigateNextClick()">
<mat-icon>navigate_next</mat-icon> <mat-icon>navigate_next</mat-icon>
@@ -75,6 +79,7 @@
id="adf-viewer-download" id="adf-viewer-download"
*ngIf="allowDownload" *ngIf="allowDownload"
mat-icon-button mat-icon-button
[attr.aria-label]="'ADF_VIEWER.ACTIONS.DOWNLOAD' | translate"
title="{{ 'ADF_VIEWER.ACTIONS.DOWNLOAD' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.DOWNLOAD' | translate }}"
data-automation-id="adf-toolbar-download" data-automation-id="adf-toolbar-download"
[adfNodeDownload]="nodeEntry"> [adfNodeDownload]="nodeEntry">
@@ -85,6 +90,7 @@
id="adf-viewer-print" id="adf-viewer-print"
*ngIf="allowPrint" *ngIf="allowPrint"
mat-icon-button mat-icon-button
[attr.aria-label]="'ADF_VIEWER.ACTIONS.PRINT' | translate"
title="{{ 'ADF_VIEWER.ACTIONS.PRINT' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.PRINT' | translate }}"
data-automation-id="adf-toolbar-print" data-automation-id="adf-toolbar-print"
(click)="printContent()"> (click)="printContent()">
@@ -95,6 +101,7 @@
id="adf-viewer-fullscreen" id="adf-viewer-fullscreen"
*ngIf="viewerType !== 'media' && allowFullScreen" *ngIf="viewerType !== 'media' && allowFullScreen"
mat-icon-button mat-icon-button
[attr.aria-label]="'ADF_VIEWER.ACTIONS.FULLSCREEN' | translate"
title="{{ 'ADF_VIEWER.ACTIONS.FULLSCREEN' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.FULLSCREEN' | translate }}"
data-automation-id="adf-toolbar-fullscreen" data-automation-id="adf-toolbar-fullscreen"
(click)="enterFullScreen()"> (click)="enterFullScreen()">
@@ -107,6 +114,7 @@
<button <button
mat-icon-button mat-icon-button
[attr.aria-expanded]="showRightSidebar" [attr.aria-expanded]="showRightSidebar"
[attr.aria-label]="'ADF_VIEWER.ACTIONS.INFO' | translate"
title="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.INFO' | translate }}"
data-automation-id="adf-toolbar-sidebar" data-automation-id="adf-toolbar-sidebar"
[color]="showRightSidebar ? 'accent' : 'default'" [color]="showRightSidebar ? 'accent' : 'default'"
@@ -121,6 +129,7 @@
id="adf-viewer-moreactions" id="adf-viewer-moreactions"
mat-icon-button mat-icon-button
[matMenuTriggerFor]="mnuMoreActions" [matMenuTriggerFor]="mnuMoreActions"
[attr.aria-label]="'ADF_VIEWER.ACTIONS.MORE_ACTIONS' | translate"
title="{{ 'ADF_VIEWER.ACTIONS.MORE_ACTIONS' | translate }}" title="{{ 'ADF_VIEWER.ACTIONS.MORE_ACTIONS' | translate }}"
data-automation-id="adf-toolbar-more-actions"> data-automation-id="adf-toolbar-more-actions">
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>