ACS-3550 Fixed accessibility issues related with move and copy dialogs (#7961)

* ACS-3550 Fixed accessibility issues related with move and copy dialogs

* ACS-3550 Revert changes for button role for cells

* ACS-3550 Shorter css rule

* ACS-3550 Fixed lint issues

* ACS-3550 Changed selector to fix e2e tests
This commit is contained in:
AleksanderSklorz
2022-11-11 21:20:05 +01:00
committed by GitHub
parent 1109a73a19
commit ba05d3a1df
11 changed files with 55 additions and 18 deletions

View File

@@ -45,7 +45,7 @@
<adf-toolbar>
<adf-toolbar-title>
<ng-container *ngIf="!showBreadcrumbs()">
<span role="heading" aria-level="3" class="adf-search-results-label">{{ 'NODE_SELECTOR.SEARCH_RESULTS' | translate }}</span>
<h2 class="adf-search-results-label">{{ 'NODE_SELECTOR.SEARCH_RESULTS' | translate }}</h2>
</ng-container>
<adf-dropdown-breadcrumb *ngIf="showBreadcrumbs()"
class="adf-content-node-selector-content-breadcrumb"
@@ -86,10 +86,11 @@
(folderChange)="onFolderChange($event)"
(ready)="onFolderLoaded($event)"
(nodeSelected)="onCurrentSelection($event)"
[class.adf-content-node-selector-content-list-empty]="emptyList"
data-automation-id="content-node-selector-document-list">
<adf-custom-empty-content-template>
<div>{{ 'NODE_SELECTOR.NO_RESULTS' | translate }}</div>
<div aria-live="polite">{{ 'NODE_SELECTOR.NO_RESULTS' | translate }}</div>
</adf-custom-empty-content-template>
<data-columns>

View File

@@ -1,7 +1,7 @@
/* stylelint-disable no-descending-specificity */
$content-node-selector-thumbnail-width: 35px !default;
.adf-search-results-label {
h2.adf-search-results-label {
flex: 1;
font-weight: 600;
font-size: var(--theme-body-1-font-size);
@@ -95,6 +95,13 @@ $content-node-selector-thumbnail-width: 35px !default;
overflow: auto;
border: 1px solid var(--theme-border-color);
border-top: 0;
position: relative;
&-empty + adf-infinite-pagination {
position: absolute;
bottom: 0;
width: 100%;
}
.adf-highlight {
color: var(--theme-primary-color);

View File

@@ -80,6 +80,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
private showSiteList = true;
private showSearchField = true;
private showCounter = false;
private _emptyList = true;
/** If true will restrict the search and breadcrumbs to the currentFolderId */
@Input()
@@ -295,6 +296,10 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
return this._chosenNode;
}
get emptyList(): boolean {
return this._emptyList;
}
getSelectedCount(): number {
return this.chosenNode?.length || 0;
}
@@ -567,6 +572,9 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
* Attempts to set the currently loaded node
*/
onFolderLoaded(nodePaging: NodePaging): void {
setTimeout(() => {
this._emptyList = !this.documentList.data.getRows().length;
});
this.updatePaginationAfterRowFilter(nodePaging);
if (!this.showingSearchResults) {
this.attemptNodeSelection(this.documentList.folderNode);

View File

@@ -1,9 +1,4 @@
<header
mat-dialog-title
data-automation-id="content-node-selector-title">
<h2>{{title}}</h2>
</header>
<h1 mat-dialog-title data-automation-id="content-node-selector-title">{{title}}</h1>
<mat-tab-group class="adf-content-node-selector-dialog-content"
mat-align-tabs="start"
(selectedIndexChange)="onTabSelectionChange($event)"