[ACA-2566][ACA-2567] permissions a11y fixes (#5560)

* fix layout and a11y, cleanup html

* fix sorting announcer

* fix i18n issue for Actions column
This commit is contained in:
Denys Vuika
2020-03-19 16:47:24 +00:00
committed by GitHub
parent a04abd0041
commit fc6a80c45a
3 changed files with 64 additions and 41 deletions

View File

@@ -14,7 +14,7 @@
role="row">
<!-- Actions (left) -->
<div *ngIf="actions && actionsPosition === 'left'" class="adf-actions-column adf-datatable-cell-header">
<span class="adf-sr-only">Actions</span>
<span class="adf-sr-only">{{ 'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate }}</span>
</div>
<!-- Columns -->
<div *ngIf="multiselect" class="adf-datatable-cell-header adf-datatable-checkbox">
@@ -33,11 +33,11 @@
[attr.aria-sort]="col.sortable ? (getAriaSort(col) | translate) : null"
adf-drop-zone dropTarget="header" [dropColumn]="col">
<span *ngIf="col.title" class="adf-datatable-cell-value">{{ col.title | translate}}</span>
<span class="adf-sr-only" aria-live="polite">{{ getSortLiveAnnouncement(col) | translate: { string: col.title | translate } }}</span>
<span *ngIf="col.title && col.sortable" class="adf-sr-only" aria-live="polite">{{ getSortLiveAnnouncement(col) | translate: { string: col.title | translate } }}</span>
</div>
<!-- Actions (right) -->
<div *ngIf="actions && actionsPosition === 'right'" class="adf-actions-column adf-datatable-cell-header adf-datatable__actions-cell">
<span class="adf-sr-only">Actions</span>
<span class="adf-sr-only">{{ 'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate }}</span>
</div>
</adf-datatable-row>
<mat-form-field *ngIf="display === 'gallery' && showHeader">