mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ACS-9224] Fixed SonarCloud issues related to accessibility improvements
This commit is contained in:
@@ -16,17 +16,22 @@
|
|||||||
class="adf-datatable-row"
|
class="adf-datatable-row"
|
||||||
role="row">
|
role="row">
|
||||||
|
|
||||||
|
|
||||||
<!-- Drag -->
|
<!-- Drag -->
|
||||||
<div *ngIf="enableDragRows" class="adf-datatable-cell-header adf-drag-column" role="columnheader" tabindex="0" [attr.aria-label]="'ADF-DATATABLE.ACCESSIBILITY.DRAG' | translate">
|
<th *ngIf="enableDragRows"
|
||||||
|
class="adf-datatable-cell-header adf-drag-column"
|
||||||
|
tabindex="0"
|
||||||
|
[attr.aria-label]="'ADF-DATATABLE.ACCESSIBILITY.DRAG' | translate">
|
||||||
<span class="adf-sr-only">{{ 'ADF-DATATABLE.ACCESSIBILITY.DRAG' | translate }}</span>
|
<span class="adf-sr-only">{{ 'ADF-DATATABLE.ACCESSIBILITY.DRAG' | translate }}</span>
|
||||||
</div>
|
</th>
|
||||||
|
|
||||||
<!-- Actions (left) -->
|
<!-- Actions (left) -->
|
||||||
<div *ngIf="actions && actionsPosition === 'left'" class="adf-actions-column adf-datatable-cell-header" role="columnheader" tabindex="0" [attr.aria-label]="'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate"
|
<th *ngIf="actions && actionsPosition === 'left'"
|
||||||
>
|
class="adf-actions-column adf-datatable-cell-header"
|
||||||
|
tabindex="0"
|
||||||
|
[attr.aria-label]="'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate">
|
||||||
<span class="adf-sr-only">{{ 'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate }}</span>
|
<span class="adf-sr-only">{{ 'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate }}</span>
|
||||||
</div>
|
</th>
|
||||||
|
|
||||||
|
|
||||||
<!-- Columns -->
|
<!-- Columns -->
|
||||||
<div *ngIf="multiselect" class="adf-datatable-cell-header adf-datatable-checkbox">
|
<div *ngIf="multiselect" class="adf-datatable-cell-header adf-datatable-checkbox">
|
||||||
@@ -132,7 +137,6 @@
|
|||||||
cdkDragHandle
|
cdkDragHandle
|
||||||
[ngClass]="{ 'adf-datatable-cell-header-drag-icon': !isResizing }"
|
[ngClass]="{ 'adf-datatable-cell-header-drag-icon': !isResizing }"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
role="presentation"
|
|
||||||
>
|
>
|
||||||
<adf-icon
|
<adf-icon
|
||||||
*ngIf="hoveredHeaderColumnIndex === columnIndex && !isResizing"
|
*ngIf="hoveredHeaderColumnIndex === columnIndex && !isResizing"
|
||||||
@@ -247,14 +251,14 @@
|
|||||||
</button>
|
</button>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
<div role="gridcell">
|
<div
|
||||||
<label *ngIf="multiselect"
|
role="gridcell"
|
||||||
(keydown.enter)="onEnterKeyPressed(row, $any($event))"
|
|
||||||
(click)="onCheckboxLabelClick(row, $event)"
|
|
||||||
[for]="'select-file-' + idx"
|
|
||||||
class="adf-datatable-cell adf-datatable-checkbox adf-datatable-checkbox-single"
|
class="adf-datatable-cell adf-datatable-checkbox adf-datatable-checkbox-single"
|
||||||
tabindex="0">
|
tabindex="0"
|
||||||
|
[attr.aria-label]="'ADF-DATATABLE.ACCESSIBILITY.SELECT_FILE' | translate"
|
||||||
|
>
|
||||||
<mat-checkbox
|
<mat-checkbox
|
||||||
|
*ngIf="multiselect"
|
||||||
[id]="'select-file-' + idx"
|
[id]="'select-file-' + idx"
|
||||||
[disabled]="!row?.isSelectable"
|
[disabled]="!row?.isSelectable"
|
||||||
[class.adf-datatable-checkbox-selected]="row.isSelected"
|
[class.adf-datatable-checkbox-selected]="row.isSelected"
|
||||||
@@ -264,13 +268,13 @@
|
|||||||
[attr.aria-label]="'ADF-DATATABLE.ACCESSIBILITY.SELECT_FILE' | translate"
|
[attr.aria-label]="'ADF-DATATABLE.ACCESSIBILITY.SELECT_FILE' | translate"
|
||||||
data-adf-datatable-row-checkbox
|
data-adf-datatable-row-checkbox
|
||||||
(change)="onCheckboxChange(row, $event)"
|
(change)="onCheckboxChange(row, $event)"
|
||||||
class="adf-checkbox-sr-only">
|
class="adf-checkbox-sr-only"
|
||||||
|
>
|
||||||
{{ 'ADF-DATATABLE.ACCESSIBILITY.SELECT_FILE' | translate }}
|
{{ 'ADF-DATATABLE.ACCESSIBILITY.SELECT_FILE' | translate }}
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
</label>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
*ngFor="let col of getVisibleColumns(); let lastColumn = last;"
|
*ngFor="let col of getVisibleColumns(); let lastColumn = last;"
|
||||||
role="gridcell"
|
role="gridcell"
|
||||||
|
Reference in New Issue
Block a user