From fec1340aa333b87148aa517b7b30f42ee8662f84 Mon Sep 17 00:00:00 2001 From: jsteenke <146953549+jsteenke@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:36:44 +0200 Subject: [PATCH] fix: add accessibility (#154) * fix: first changes accessibility * fix: add accessibility --- .../app-detail/app-detail.component.html | 22 ++++++++++++-- .../app-search/app-search.component.html | 29 ++++++++++++++----- .../permission-detail.component.html | 12 ++++++-- .../role-detail/role-detail.component.html | 29 +++++++++++++++++-- .../user-roles-permissions.component.html | 22 ++++++++++---- src/assets/i18n/de.json | 3 +- src/assets/i18n/en.json | 3 +- 7 files changed, 98 insertions(+), 22 deletions(-) diff --git a/src/app/permission/app-detail/app-detail.component.html b/src/app/permission/app-detail/app-detail.component.html index 93d478b..ae2ed00 100644 --- a/src/app/permission/app-detail/app-detail.component.html +++ b/src/app/permission/app-detail/app-detail.component.html @@ -116,6 +116,7 @@ styleClass="h-full" icon="pi pi-refresh" (onClick)="onReload()" + ariaLabel="'ACTIONS.SEARCH.RELOAD' | translate" [pTooltip]="'ACTIONS.SEARCH.RELOAD' | translate" tooltipPosition="top" tooltipEvent="hover" @@ -147,6 +148,7 @@ [id]="'apm_application_detail_permission_table_header_permission_tools'" class="p-button-rounded font-medium p-button-text p-button p-component p-button-icon-only" (click)="showPermissionTools = !showPermissionTools" + aria-label="'ACTIONS.VIEW.PERMISSION.TOOLS' | translate" [pTooltip]="'ACTIONS.VIEW.PERMISSION.TOOLS' | translate" tooltipPosition="top" tooltipEvent="hover" @@ -160,6 +162,7 @@ [id]="'apm_application_detail_permission_table_header_permission_create'" class="p-button-rounded font-medium p-button-text p-button p-component p-button-icon-only" (click)="onCreatePermission()" + aria-label="'ACTIONS.CREATE.PERMISSION' | translate" [pTooltip]="'ACTIONS.CREATE.PERMISSION' | translate" tooltipPosition="top" tooltipEvent="hover" @@ -177,6 +180,7 @@
{{ 'PERMISSION.ACTIONS' | translate }} @@ -343,6 +351,7 @@ [id]="'app_detail_permission_table_sort_app_id'" class="p-2 mr-0 p-button-rounded font-medium p-button-text p-button p-component p-button-icon-only" (click)="onFilterItemSortIcon($event, sortIconAppId, 'appId')" + aria-label="'PERMISSION.SORT.APP_ID' | translate" [pTooltip]="'PERMISSION.SORT.APP_ID' | translate" tooltipPosition="top" tooltipEvent="hover" @@ -375,6 +384,7 @@ [id]="'app_detail_permission_table_col_' + role.name + '_action_delete'" class="p-1 mr-0 p-button-rounded font-medium p-button-text p-button p-component p-button-icon-only" (click)="onDeleteRole($event, role)" + aria-label="'ACTIONS.DELETE.ROLE' | translate" [pTooltip]="'ACTIONS.DELETE.ROLE' | translate" tooltipPosition="top" tooltipEvent="hover" @@ -388,6 +398,7 @@ [id]="'app_detail_permission_table_col_' + role.id + '_action_edit'" class="p-1 p-button-rounded font-medium p-button-text p-button p-component p-button-icon-only" (click)="onEditRole($event, role)" + aria-label="'ACTIONS.EDIT.ROLE' | translate" [pTooltip]="'ACTIONS.EDIT.ROLE' | translate" tooltipPosition="top" tooltipEvent="hover" @@ -402,6 +413,7 @@ [id]="'app_detail_permission_table_col_' + role.id + '_action_grant_all'" class="p-1 p-button-rounded font-medium p-button-text p-button p-component p-button-icon-only" (click)="onGrantAllPermissions($event, role)" + aria-label="'PERMISSION.ASSIGNMENTS.GRANT_ALL_FOR_ROLE' | translate" [pTooltip]="'PERMISSION.ASSIGNMENTS.GRANT_ALL_FOR_ROLE' | translate" tooltipPosition="top" tooltipEvent="hover" @@ -415,6 +427,7 @@ [id]="'app_detail_permission_table_col_' + role.id + '_action_revoke_all'" class="p-1 p-button-rounded font-medium p-button-text p-button p-component p-button-icon-only" (click)="onRevokeAllPermissions($event, role)" + aria-label="'PERMISSION.ASSIGNMENTS.REVOKE_ALL_FOR_ROLE' | translate" [pTooltip]="'PERMISSION.ASSIGNMENTS.REVOKE_ALL_FOR_ROLE' | translate" tooltipPosition="top" tooltipEvent="hover" @@ -440,7 +453,7 @@
diff --git a/src/app/permission/role-detail/role-detail.component.html b/src/app/permission/role-detail/role-detail.component.html index 292fe16..35bbe74 100644 --- a/src/app/permission/role-detail/role-detail.component.html +++ b/src/app/permission/role-detail/role-detail.component.html @@ -12,13 +12,31 @@
- +
- +
@@ -135,8 +153,10 @@ icon="pi pi-times" iconPos="left" [label]="'ACTIONS.CANCEL' | translate" - [title]="'ACTIONS.TOOLTIPS.CANCEL' | translate" (click)="onClose()" + [pTooltip]="'ACTIONS.TOOLTIPS.CANCEL' | translate" + tooltipPosition="top" + tooltipEvent="hover" >
diff --git a/src/app/remotes/user-roles-permissions/user-roles-permissions.component.html b/src/app/remotes/user-roles-permissions/user-roles-permissions.component.html index 6f509b1..4c7e442 100644 --- a/src/app/remotes/user-roles-permissions/user-roles-permissions.component.html +++ b/src/app/remotes/user-roles-permissions/user-roles-permissions.component.html @@ -6,7 +6,11 @@ - + {{ 'USER_ROLE_PERMISSIONS.TAB_NAME_PERMISSIONS' | translate }} @@ -45,8 +49,10 @@ id="up_permission_table_filter_clear" class="p-inputgroup-addon bg-primary cursor-pointer pi pi-filter-slash" (click)="onClearFilterUserAssignmentTable()" - [title]="'GENERAL.FILTER_CLEAR' | translate" tabindex="0" + [pTooltip]="'GENERAL.FILTER_CLEAR' | translate" + tooltipPosition="top" + tooltipEvent="hover" > @@ -55,9 +61,11 @@ type="button" id="up_permissions_header_action_reload" styleClass="h-full" - [title]="'ACTIONS.SEARCH.RELOAD' | translate" - (onClick)="onReload()" icon="pi pi-refresh" + (onClick)="onReload()" + [pTooltip]="'ACTIONS.SEARCH.RELOAD' | translate" + tooltipPosition="top" + tooltipEvent="hover" > @@ -102,7 +110,11 @@ - + {{ 'USER_ROLE_PERMISSIONS.TAB_NAME_ROLES' | translate }} diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index c829fea..46c16a5 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -233,7 +233,8 @@ "LIST": "Liste der fehlenden Rollen", "INFO": "(IAM: Identity Access Management = Benutzer & Rollen)", "Filter": "Filter", - "SAVE": "Auswahl übernehmen" + "SAVE": "Auswahl übernehmen", + "SAVE.TOOLTIP": "Augewählte Rollen übernehmen" } }, "VALIDATION": { diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index d664323..b2460a7 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -233,7 +233,8 @@ "LIST": "List of missing Roles", "INFO": "(IAM: Identity Access Management = User & Roles)", "Filter": "Filter", - "SAVE": "Add selection" + "SAVE": "Add selection", + "SAVE.TOOLTIP": "Add selected roles" } }, "VALIDATION": {