[ADF-3863] - DocumentList add accesibility tags for file type and for… (#4186)

* [ADF-3863] - DocumentList add accesibility tags for file type and for rows template

* [ADF-3863] - DocumentList add pipe for file type accesibility tags

* [ADF-3863] - DocumentList add pipe for file type accesibility tags

* [ADF-3863] DocumentList - change FiletType pipe to pure
This commit is contained in:
Silviu Popa
2019-02-19 17:54:54 +02:00
committed by Eugenio Romano
parent 08231bbf33
commit 3739424953
7 changed files with 80 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ import { DataTableAdapter } from '../../data/datatable-adapter';
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<ng-container>
<span [title]="tooltip" class="adf-datatable-cell-value">{{value}}</span>
<span [attr.aria-label]="value" [title]="tooltip" class="adf-datatable-cell-value">{{value}}</span>
</ng-container>`,
encapsulation: ViewEncapsulation.None,
host: { class: 'adf-datatable-cell' }

View File

@@ -104,6 +104,7 @@
</mat-icon>
<ng-template #no_selected_row>
<img
[attr.aria-label]="data.getValue(row, col) | fileType"
alt="{{ iconAltTextKey(data.getValue(row, col)) | translate }}"
src="{{ data.getValue(row, col) }}"
(error)="onImageLoadingError($event, row)">

View File

@@ -27,12 +27,12 @@ import {
template: `
<ng-container>
<span title="{{ tooltip | date:'medium' }}" *ngIf="format === 'timeAgo' else standard_date">
<span title="{{ tooltip | date:'medium' }}" *ngIf="format === 'timeAgo' else standard_date" [attr.aria-label]=" value | adfTimeAgo: currentLocale ">
{{ value | adfTimeAgo: currentLocale }}
</span>
</ng-container>
<ng-template #standard_date>
<span title="{{ tooltip | date:format }}">
<span [attr.aria-label]=" value | date:format " title="{{ tooltip | date:format }}">
{{ value | date:format }}
</span>
</ng-template>

View File

@@ -22,7 +22,7 @@ import { DataTableCellComponent } from './datatable-cell.component';
selector: 'adf-filesize-cell',
template: `
<ng-container>
<span [title]="tooltip">{{ value | adfFileSize }}</span>
<span [attr.aria-label]=" value | adfFileSize " [title]="tooltip">{{ value | adfFileSize }}</span>
</ng-container>
`,
encapsulation: ViewEncapsulation.None,