[ADF-4831] DocumentList - filetype alternative text is not meaningful (#4998)

* filetype alternative text

* icons text translation key

* icon text accessibility translation

* fix e2e

* add miscellaneous file type
This commit is contained in:
Cilibiu Bogdan
2019-09-05 13:50:28 +03:00
committed by Eugenio Romano
parent ef09b077c4
commit bf6889ee54
3 changed files with 36 additions and 5 deletions

View File

@@ -116,15 +116,28 @@
</mat-icon>
<ng-template #no_selected_row>
<img class="adf-datatable-center-img-ie"
[attr.aria-label]="data.getValue(row, col) | fileType"
alt="{{ iconAltTextKey(data.getValue(row, col)) | translate }}"
[attr.aria-label]=" (data.getValue(row, col) | fileType) === 'disable' ?
('ADF-DATATABLE.ACCESSIBILITY.ICON_DISABLED' | translate) :
'ADF-DATATABLE.ACCESSIBILITY.ICON_TEXT' | translate:{
type: 'ADF-DATATABLE.FILE_TYPE.' + (data.getValue(row, col) | fileType | uppercase) | translate
}"
[attr.alt]=" (data.getValue(row, col) | fileType) === 'disable' ?
('ADF-DATATABLE.ACCESSIBILITY.ICON_DISABLED' | translate) :
'ADF-DATATABLE.ACCESSIBILITY.ICON_TEXT' | translate:{
type: 'ADF-DATATABLE.FILE_TYPE.' + (data.getValue(row, col) | fileType | uppercase) | translate
}"
src="{{ data.getValue(row, col) }}"
(error)="onImageLoadingError($event, row)">
</ng-template>
</ng-template>
</div>
<div *ngSwitchCase="'icon'" class="adf-cell-value">
<span class="adf-sr-only">{{ iconAltTextKey(data.getValue(row, col)) | translate }}</span>
<span class="adf-sr-only">
{{ 'ADF-DATATABLE.ACCESSIBILITY.ICON_ALT_TEXT' | translate:{
type: 'ADF-DATATABLE.FILE_TYPE.' + (data.getValue(row, col) | fileType | uppercase) | translate
}
}}
</span>
<mat-icon>{{ data.getValue(row, col) }}</mat-icon>
</div>
<div *ngSwitchCase="'date'" class="adf-cell-value"