mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ACS-9224] Fix datatable accessibility and styling issues
This commit is contained in:
@@ -17,14 +17,17 @@
|
||||
role="row">
|
||||
|
||||
<!-- Drag -->
|
||||
<div *ngIf="enableDragRows" class="adf-datatable-cell-header adf-drag-column">
|
||||
<div *ngIf="enableDragRows" class="adf-datatable-cell-header adf-drag-column" role="presentation">
|
||||
<div cdkDragHandle
|
||||
class="adf-drag-handle"
|
||||
aria-hidden="true">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Actions (left) -->
|
||||
<div *ngIf="actions && actionsPosition === 'left'"
|
||||
class="adf-actions-column adf-datatable-cell-header"
|
||||
tabindex="0"
|
||||
[attr.aria-label]="'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate">
|
||||
role="columnheader">
|
||||
<span class="adf-sr-only">{{ 'ADF-DATATABLE.ACCESSIBILITY.ACTIONS' | translate }}</span>
|
||||
</div>
|
||||
|
||||
@@ -109,9 +112,7 @@
|
||||
</span>
|
||||
|
||||
<span *ngIf="!col.title && !col.sortable && !headerFilterTemplate"
|
||||
class="adf-sr-only"
|
||||
[attr.title]="'ADF-DATATABLE.ACCESSIBILITY.EMPTY_HEADER' | translate">
|
||||
{{ 'ADF-DATATABLE.ACCESSIBILITY.EMPTY_HEADER' | translate }}
|
||||
</span>
|
||||
|
||||
</ng-container>
|
||||
|
@@ -288,11 +288,13 @@ $data-table-cell-min-width-file-size: $data-table-cell-min-width-1 !default;
|
||||
/* stylelint-disable-next-line no-duplicate-selectors */
|
||||
.adf-datatable-cell,
|
||||
.adf-datatable-cell-header {
|
||||
flex: 1;
|
||||
flex: 1 1 0%;
|
||||
padding: 0;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
align-self: stretch;
|
||||
min-width: 0;
|
||||
min-height: 48px;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 15px;
|
||||
@@ -300,7 +302,12 @@ $data-table-cell-min-width-file-size: $data-table-cell-min-width-1 !default;
|
||||
}
|
||||
|
||||
&.adf-drag-column {
|
||||
flex: 0;
|
||||
flex: 0 0 24px;
|
||||
width: 24px;
|
||||
padding: 0;
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.adf-datatable-cell-container {
|
||||
@@ -315,11 +322,47 @@ $data-table-cell-min-width-file-size: $data-table-cell-min-width-1 !default;
|
||||
.adf-datatable-cell-value {
|
||||
word-break: break-word;
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
|
||||
padding: 17px 10px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.adf-drag-handle {
|
||||
cursor: grab;
|
||||
width: 24px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.2s ease, background-color 0.2s ease;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
touch-action: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
background-color: rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
|
||||
&:active {
|
||||
cursor: grabbing;
|
||||
opacity: 1;
|
||||
background-color: rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '⋮⋮';
|
||||
font-size: 16px;
|
||||
color: currentcolor;
|
||||
opacity: 0.7;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.adf-datatable-row .adf-datatable-actions-menu {
|
||||
|
Reference in New Issue
Block a user