mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
[ADF-3115] a11y fixes (#3424)
* a11y fixes for search input * a11y fixes for pagination * a11y fixes for content actions
This commit is contained in:
@@ -160,6 +160,13 @@
|
|||||||
},
|
},
|
||||||
"SEARCH": {
|
"SEARCH": {
|
||||||
"CONTROL": {},
|
"CONTROL": {},
|
||||||
|
"BUTTON": {
|
||||||
|
"TOOLTIP": "Search",
|
||||||
|
"ARIA-LABEL": "Search button"
|
||||||
|
},
|
||||||
|
"INPUT": {
|
||||||
|
"ARIA-LABEL": "Search input"
|
||||||
|
},
|
||||||
"RESULTS": {
|
"RESULTS": {
|
||||||
"SUMMARY": "{{numResults}} result found for {{searchTerm}}",
|
"SUMMARY": "{{numResults}} result found for {{searchTerm}}",
|
||||||
"NONE": "No results found for {{searchTerm}}",
|
"NONE": "No results found for {{searchTerm}}",
|
||||||
|
@@ -1,15 +1,17 @@
|
|||||||
<div class="adf-search-container">
|
<div class="adf-search-container">
|
||||||
<div *ngIf="isLoggedIn()" [@transitionMessages]="subscriptAnimationState" (@transitionMessages.done)="applySearchFocus($event)">
|
<div *ngIf="isLoggedIn()" [@transitionMessages]="subscriptAnimationState" (@transitionMessages.done)="applySearchFocus($event)">
|
||||||
<a mat-icon-button
|
<button mat-icon-button
|
||||||
*ngIf="expandable"
|
*ngIf="expandable"
|
||||||
id="adf-search-button"
|
id="adf-search-button"
|
||||||
class="adf-search-button"
|
class="adf-search-button"
|
||||||
|
[title]="'SEARCH.BUTTON.TOOLTIP' | translate"
|
||||||
(click)="toggleSearchBar($event)"
|
(click)="toggleSearchBar($event)"
|
||||||
(keyup.enter)="toggleSearchBar($event)">
|
(keyup.enter)="toggleSearchBar($event)">
|
||||||
<mat-icon aria-label="search button">search</mat-icon>
|
<mat-icon [attr.aria-label]="'SEARCH.BUTTON.ARIA-LABEL' | translate">search</mat-icon>
|
||||||
</a>
|
</button>
|
||||||
<mat-form-field class="adf-input-form-field-divider">
|
<mat-form-field class="adf-input-form-field-divider">
|
||||||
<input matInput #searchInput
|
<input matInput #searchInput
|
||||||
|
[attr.aria-label]="'SEARCH.INPUT.ARIA-LABEL' | translate"
|
||||||
[type]="inputType"
|
[type]="inputType"
|
||||||
[autocomplete]="getAutoComplete()"
|
[autocomplete]="getAutoComplete()"
|
||||||
id="adf-control-input"
|
id="adf-control-input"
|
||||||
|
@@ -59,6 +59,7 @@
|
|||||||
<!-- Actions (left) -->
|
<!-- Actions (left) -->
|
||||||
<div *ngIf="actions && actionsPosition === 'left'" class="adf-datatable-table-cell">
|
<div *ngIf="actions && actionsPosition === 'left'" class="adf-datatable-table-cell">
|
||||||
<button mat-icon-button [matMenuTriggerFor]="menu"
|
<button mat-icon-button [matMenuTriggerFor]="menu"
|
||||||
|
[title]="'ADF-DATATABLE.CONTENT-ACTIONS.TOOLTIP' | translate"
|
||||||
[attr.id]="'action_menu_left_' + idx"
|
[attr.id]="'action_menu_left_' + idx"
|
||||||
[attr.data-automation-id]="'action_menu_' + idx">
|
[attr.data-automation-id]="'action_menu_' + idx">
|
||||||
<mat-icon>more_vert</mat-icon>
|
<mat-icon>more_vert</mat-icon>
|
||||||
@@ -162,6 +163,7 @@
|
|||||||
<div *ngIf="actions && actionsPosition === 'right'"
|
<div *ngIf="actions && actionsPosition === 'right'"
|
||||||
class="adf-datatable-table-cell alfresco-datatable__actions-cell">
|
class="adf-datatable-table-cell alfresco-datatable__actions-cell">
|
||||||
<button mat-icon-button [matMenuTriggerFor]="menu"
|
<button mat-icon-button [matMenuTriggerFor]="menu"
|
||||||
|
[title]="'ADF-DATATABLE.CONTENT-ACTIONS.TOOLTIP' | translate"
|
||||||
[attr.id]="'action_menu_right_' + idx"
|
[attr.id]="'action_menu_right_' + idx"
|
||||||
[attr.data-automation-id]="'action_menu_' + idx">
|
[attr.data-automation-id]="'action_menu_' + idx">
|
||||||
<mat-icon>more_vert</mat-icon>
|
<mat-icon>more_vert</mat-icon>
|
||||||
|
@@ -38,6 +38,12 @@
|
|||||||
"YB": "YB"
|
"YB": "YB"
|
||||||
},
|
},
|
||||||
"PAGINATION": {
|
"PAGINATION": {
|
||||||
|
"ARIA": {
|
||||||
|
"ITEMS_PER_PAGE": "Page size selector",
|
||||||
|
"CURRENT_PAGE": "Current page selector",
|
||||||
|
"PREVIOUS_PAGE": "Previous page button",
|
||||||
|
"NEXT_PAGE": "Next page button"
|
||||||
|
},
|
||||||
"ITEMS_RANGE": "Showing {{ range }} of {{ total }}",
|
"ITEMS_RANGE": "Showing {{ range }} of {{ total }}",
|
||||||
"ITEMS_PER_PAGE": "Items per page",
|
"ITEMS_PER_PAGE": "Items per page",
|
||||||
"CURRENT_PAGE": "Page {{ number }}",
|
"CURRENT_PAGE": "Page {{ number }}",
|
||||||
@@ -201,6 +207,9 @@
|
|||||||
"TITLE": "Drag and drop",
|
"TITLE": "Drag and drop",
|
||||||
"SUBTITLE": "to upload files"
|
"SUBTITLE": "to upload files"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"CONTENT-ACTIONS": {
|
||||||
|
"TOOLTIP": "Content actions"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"USER_PROFILE": {
|
"USER_PROFILE": {
|
||||||
|
@@ -19,7 +19,10 @@
|
|||||||
{{ pagination.maxItems }}
|
{{ pagination.maxItems }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<button mat-icon-button [matMenuTriggerFor]="pageSizeMenu">
|
<button
|
||||||
|
mat-icon-button
|
||||||
|
[attr.aria-label]="'CORE.PAGINATION.ARIA.ITEMS_PER_PAGE' | translate"
|
||||||
|
[matMenuTriggerFor]="pageSizeMenu">
|
||||||
<mat-icon>arrow_drop_down</mat-icon>
|
<mat-icon>arrow_drop_down</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -40,6 +43,7 @@
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
|
[attr.aria-label]="'CORE.PAGINATION.ARIA.CURRENT_PAGE' | translate"
|
||||||
[matMenuTriggerFor]="pagesMenu"
|
[matMenuTriggerFor]="pagesMenu"
|
||||||
*ngIf="pages.length > 1">
|
*ngIf="pages.length > 1">
|
||||||
<mat-icon>arrow_drop_down</mat-icon>
|
<mat-icon>arrow_drop_down</mat-icon>
|
||||||
@@ -63,6 +67,7 @@
|
|||||||
<button
|
<button
|
||||||
class="adf-pagination__previous-button"
|
class="adf-pagination__previous-button"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
|
[attr.aria-label]="'CORE.PAGINATION.ARIA.PREVIOUS_PAGE' | translate"
|
||||||
[disabled]="isFirstPage"
|
[disabled]="isFirstPage"
|
||||||
(click)="goPrevious()">
|
(click)="goPrevious()">
|
||||||
<mat-icon>keyboard_arrow_left</mat-icon>
|
<mat-icon>keyboard_arrow_left</mat-icon>
|
||||||
@@ -71,6 +76,7 @@
|
|||||||
<button
|
<button
|
||||||
class="adf-pagination__next-button"
|
class="adf-pagination__next-button"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
|
[attr.aria-label]="'CORE.PAGINATION.ARIA.NEXT_PAGE' | translate"
|
||||||
[disabled]="isLastPage"
|
[disabled]="isLastPage"
|
||||||
(click)="goNext()">
|
(click)="goNext()">
|
||||||
<mat-icon>keyboard_arrow_right</mat-icon>
|
<mat-icon>keyboard_arrow_right</mat-icon>
|
||||||
|
Reference in New Issue
Block a user