[ACA-2499] DocumentList - custom name column link does not have a role (#1188)

* custom element as accessibility link

* fix focus outline

* internationalization key

* folder link aria-label

* use not folder evaluation  for shared files
This commit is contained in:
Cilibiu Bogdan 2019-08-22 14:33:01 +03:00 committed by Suzana Dirla
parent ee93ac3e0f
commit 2aa44ac6d8
4 changed files with 21 additions and 1 deletions

View File

@ -5,6 +5,16 @@
}" }"
> >
<span <span
role="link"
[attr.aria-label]="
(isFile()
? 'CUSTOM_NAME_COLUMN.ACCESSIBILITY.FILE_LINK_ARIA_LABEL'
: 'CUSTOM_NAME_COLUMN.ACCESSIBILITY.FOLDER_LINK_ARIA_LABEL')
| translate
: {
name: displayText$ | async
}
"
class="adf-datatable-cell-value" class="adf-datatable-cell-value"
title="{{ node | adfNodeNameTooltip }}" title="{{ node | adfNodeNameTooltip }}"
(click)="onClick()" (click)="onClick()"

View File

@ -16,4 +16,8 @@
.aca-custom-name-column { .aca-custom-name-column {
display: block; display: block;
align-items: center; align-items: center;
.adf-datatable-cell-value {
margin: 0 4px;
}
} }

View File

@ -102,7 +102,7 @@ export class CustomNameColumnComponent extends NameColumnComponent
} }
isFile(): boolean { isFile(): boolean {
return this.node && this.node.entry && this.node.entry.isFile; return this.node && this.node.entry && !this.node.entry.isFolder;
} }
isFileWriteLocked(): boolean { isFileWriteLocked(): boolean {

View File

@ -499,5 +499,11 @@
"TOOLTIP": "Upload new version" "TOOLTIP": "Upload new version"
} }
} }
},
"CUSTOM_NAME_COLUMN": {
"ACCESSIBILITY": {
"FILE_LINK_ARIA_LABEL": "View file {{ name }}",
"FOLDER_LINK_ARIA_LABEL": "Open {{ name }} folder"
}
} }
} }