From fbcfd816d3f1f89d8400528c6be9343cabb79e55 Mon Sep 17 00:00:00 2001 From: markuczy Date: Fri, 23 Feb 2024 10:39:12 +0100 Subject: [PATCH 01/13] feat: home breadcrumb has ariaLabel set --- .../assets/i18n/de.json | 3 ++- .../assets/i18n/en.json | 3 ++- .../page-header/page-header.component.html | 3 ++- .../page-header/page-header.component.ts | 19 ++++++++++++++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/libs/portal-integration-angular/assets/i18n/de.json b/libs/portal-integration-angular/assets/i18n/de.json index 6700ddf1..c1afe319 100644 --- a/libs/portal-integration-angular/assets/i18n/de.json +++ b/libs/portal-integration-angular/assets/i18n/de.json @@ -76,7 +76,8 @@ "EXPORT": "Alle Ereignisse exportieren" }, "OCX_PAGE_HEADER": { - "MORE_ACTIONS": "Weitere Aktionen" + "MORE_ACTIONS": "Weitere Aktionen", + "HOME": "Home" }, "OCX_HEADER": { "MENU_TOGGLE": "Menü" diff --git a/libs/portal-integration-angular/assets/i18n/en.json b/libs/portal-integration-angular/assets/i18n/en.json index 357b85a7..6f2c716c 100644 --- a/libs/portal-integration-angular/assets/i18n/en.json +++ b/libs/portal-integration-angular/assets/i18n/en.json @@ -76,7 +76,8 @@ "EXPORT": "Export all events" }, "OCX_PAGE_HEADER": { - "MORE_ACTIONS": "More actions" + "MORE_ACTIONS": "More actions", + "HOME": "Home" }, "OCX_HEADER": { "MENU_TOGGLE": "Menu" diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html index cb9d8ab7..915cda30 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html @@ -3,7 +3,8 @@ diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts index 490c8404..884ea1ea 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts @@ -52,6 +52,11 @@ export interface ObjectDetailItem { valuePipeArgs?: string } +export interface HomeItem { + menuItem: MenuItem + ariaLabel?: string +} + @Component({ selector: 'ocx-page-header', templateUrl: './page-header.component.html', @@ -112,7 +117,7 @@ export class PageHeaderComponent implements OnInit, OnChanges { dd = new Date() breadcrumbs$!: Observable - home$!: Observable + home$!: Observable protected breadcrumbs: BreadcrumbService @@ -124,8 +129,16 @@ export class PageHeaderComponent implements OnInit, OnChanges { ) { this.breadcrumbs = breadcrumbs this.home$ = concat( - of({ icon: 'pi pi-home', routerLink: '/' }), - this.appStateService.currentPortal$.pipe(map((portal) => ({ icon: 'pi pi-home', routerLink: portal.baseUrl }))) + of({ menuItem: { icon: 'pi pi-home', routerLink: '/' } }), + this.appStateService.currentPortal$.pipe( + map((portal) => ({ + menuItem: { + icon: 'pi pi-home', + routerLink: portal.baseUrl, + }, + ariaLabel: portal.portalName, + })) + ) ) } ngOnChanges(changes: SimpleChanges): void { From 311ad06988f01590b4d00b41c17c578d359ad411 Mon Sep 17 00:00:00 2001 From: markuczy Date: Fri, 23 Feb 2024 11:01:07 +0100 Subject: [PATCH 02/13] feat: page-header header and subheader showed only if defined --- .../core/components/page-header/page-header.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html index 915cda30..7061da3a 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html @@ -24,8 +24,8 @@
-

{{ header }}

-

{{ subheader }}

+

{{ header }}

+

{{ subheader }}

From d4fde210c58c70165811eeaab2e55beeb54a5818 Mon Sep 17 00:00:00 2001 From: markuczy Date: Mon, 26 Feb 2024 14:58:09 +0100 Subject: [PATCH 03/13] feat: column selector button accessible --- .../custom-group-column-selector.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html b/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html index 1d89b0e1..bff1d319 100644 --- a/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html @@ -5,6 +5,7 @@ [title]="openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_TITLE' | translate)" icon="pi pi-cog" styleClass="p-button" + [ariaLabel]="openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_TITLE' | translate)" > From 0b11d0be0622240faf576ea1b97291cd906f03f9 Mon Sep 17 00:00:00 2001 From: markuczy Date: Mon, 26 Feb 2024 15:05:21 +0100 Subject: [PATCH 04/13] fix: unique components ids --- .../data-list-grid/data-list-grid.component.html | 9 +++------ .../data-table/data-table.component.html | 14 +++++--------- .../testing/default-list-item.harness.ts | 6 +++--- .../testing/primeng/p-multiSelect.harness.ts | 11 ++++++++--- .../testing/table-header-column.harness.ts | 4 ++-- .../testing/table-row.harness.ts | 6 +++--- 6 files changed, 24 insertions(+), 26 deletions(-) diff --git a/libs/portal-integration-angular/src/lib/core/components/data-list-grid/data-list-grid.component.html b/libs/portal-integration-angular/src/lib/core/components/data-list-grid/data-list-grid.component.html index 8a0fe6f7..33d206fd 100644 --- a/libs/portal-integration-angular/src/lib/core/components/data-list-grid/data-list-grid.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/data-list-grid/data-list-grid.component.html @@ -81,11 +81,10 @@
{ - return new HarnessPredicate(PMultiSelectHarness, options).addOption('id', options.id, (harness, id) => - HarnessPredicate.stringMatches(harness.getId(), id) - ) + return new HarnessPredicate(PMultiSelectHarness, options) + .addOption('id', options.id, (harness, id) => HarnessPredicate.stringMatches(harness.getId(), id)) + .addOption('class', options.class, (harness, c) => HarnessPredicate.stringMatches(harness.getByClass(c), c)) } async getId(): Promise { return await (await this.host()).getAttribute('id') } + async getByClass(c: string): Promise { + return (await (await this.host()).hasClass(c)) ? c : '' + } + async getHarnessLoaderForPMultiSelectPanel(): Promise { const rootLocator = this.documentRootLocatorFactory() return rootLocator.harnessLoaderFor('.p-multiselect-panel') diff --git a/libs/portal-integration-angular/testing/table-header-column.harness.ts b/libs/portal-integration-angular/testing/table-header-column.harness.ts index 4ab4cf2f..c504a68b 100644 --- a/libs/portal-integration-angular/testing/table-header-column.harness.ts +++ b/libs/portal-integration-angular/testing/table-header-column.harness.ts @@ -7,13 +7,13 @@ export class TableHeaderColumnHarness extends ContentContainerComponentHarness { getSortButton = this.locatorFor( ButtonHarness.with({ - id: 'sortButton', + class: 'sortButton', }) ) getFilterMultiSelect = this.locatorFor( PMultiSelectHarness.with({ - id: 'filterMultiSelect', + class: 'filterMultiSelect', }) ) diff --git a/libs/portal-integration-angular/testing/table-row.harness.ts b/libs/portal-integration-angular/testing/table-row.harness.ts index 5cd137a2..e15e803d 100644 --- a/libs/portal-integration-angular/testing/table-row.harness.ts +++ b/libs/portal-integration-angular/testing/table-row.harness.ts @@ -5,9 +5,9 @@ export class TableRowHarness extends ContentContainerComponentHarness { static hostSelector = 'tbody > tr' getAllActionButtons = this.locatorForAll('button') - getViewButton = this.locatorForOptional(ButtonHarness.with({ id: 'viewTableRowButton' })) - getEditButton = this.locatorForOptional(ButtonHarness.with({ id: 'editTableRowButton' })) - getDeleteButton = this.locatorForOptional(ButtonHarness.with({ id: 'deleteTableRowButton' })) + getViewButton = this.locatorForOptional(ButtonHarness.with({ class: 'viewTableRowButton' })) + getEditButton = this.locatorForOptional(ButtonHarness.with({ class: 'editTableRowButton' })) + getDeleteButton = this.locatorForOptional(ButtonHarness.with({ class: 'deleteTableRowButton' })) async getData(): Promise { const tds = await this.locatorForAll('td')() From e6c929ee1d672215e1815958763b9dbf79891ce7 Mon Sep 17 00:00:00 2001 From: markuczy Date: Tue, 27 Feb 2024 09:04:38 +0100 Subject: [PATCH 05/13] feat: data-list-grid buttons accessible --- libs/portal-integration-angular/assets/i18n/de.json | 6 ++++-- libs/portal-integration-angular/assets/i18n/en.json | 6 ++++-- .../data-list-grid-sorting.component.html | 1 + .../components/data-list-grid/data-list-grid.component.html | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libs/portal-integration-angular/assets/i18n/de.json b/libs/portal-integration-angular/assets/i18n/de.json index f135c6bd..eaef67ef 100644 --- a/libs/portal-integration-angular/assets/i18n/de.json +++ b/libs/portal-integration-angular/assets/i18n/de.json @@ -30,7 +30,8 @@ "ASCENDING_TITLE": "Auftseigend", "DESCENDING_TITLE": "Absteigend", "DEFAULT_TITLE": "Standard" - } + }, + "SORTING_BUTTON_ARIA_LABEL": "Change sorting direction. Now is {direction}" }, "OCX_DATA_TABLE": { "EMPTY_RESULT": "Keine Daten gefunden.", @@ -53,7 +54,8 @@ "VIEW": "Anzeigen", "EDIT": "Bearbeiten", "DELETE": "Löschen" - } + }, + "MORE_ACTIONS": "Weitere Aktionen" }, "OCX_DATA_LAYOUT_SELECTION": { "LAYOUT": { diff --git a/libs/portal-integration-angular/assets/i18n/en.json b/libs/portal-integration-angular/assets/i18n/en.json index d8920776..edaf03e6 100644 --- a/libs/portal-integration-angular/assets/i18n/en.json +++ b/libs/portal-integration-angular/assets/i18n/en.json @@ -30,7 +30,8 @@ "ASCENDING_TITLE": "Ascending", "DESCENDING_TITLE": "Descending", "DEFAULT_TITLE": "Default" - } + }, + "SORTING_BUTTON_ARIA_LABEL": "Change sorting direction. Now is {{direction}}" }, "OCX_DATA_TABLE": { "EMPTY_RESULT": "No data found.", @@ -53,7 +54,8 @@ "VIEW": "View", "EDIT": "Edit", "DELETE": "Delete" - } + }, + "MORE_ACTIONS": "More actions" }, "OCX_DATA_LAYOUT_SELECTION": { "LAYOUT": { diff --git a/libs/portal-integration-angular/src/lib/core/components/data-list-grid-sorting/data-list-grid-sorting.component.html b/libs/portal-integration-angular/src/lib/core/components/data-list-grid-sorting/data-list-grid-sorting.component.html index 2e38b895..e1602e6d 100644 --- a/libs/portal-integration-angular/src/lib/core/components/data-list-grid-sorting/data-list-grid-sorting.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/data-list-grid-sorting/data-list-grid-sorting.component.html @@ -19,5 +19,6 @@ styleClass="p-button-outlined" (onClick)="sortDirectionChanged()" [title]="(sortIconTitle() | translate)" + [ariaLabel]="('OCX_LIST_GRID_SORT.SORTING_BUTTON_ARIA_LABEL' | translate:{direction: (sortIconTitle() | translate)})" >
diff --git a/libs/portal-integration-angular/src/lib/core/components/data-list-grid/data-list-grid.component.html b/libs/portal-integration-angular/src/lib/core/components/data-list-grid/data-list-grid.component.html index 33d206fd..ec90279a 100644 --- a/libs/portal-integration-angular/src/lib/core/components/data-list-grid/data-list-grid.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/data-list-grid/data-list-grid.component.html @@ -58,6 +58,7 @@ pButton (click)="setSelectedItem(item); menu.toggle($event)" icon="pi pi-ellipsis-v" + [ariaLabel]="'OCX_DATA_LIST_GRID.MORE_ACTIONS' | translate" class="more-actions-menu-button menu-btn" >
From d6511c895aadcb8060002c165bcea46b7d27a335 Mon Sep 17 00:00:00 2001 From: markuczy Date: Wed, 28 Feb 2024 14:09:41 +0100 Subject: [PATCH 06/13] feat: page-header header and subheader use correct tags --- .../core/components/page-header/page-header.component.html | 4 ++-- .../core/components/page-header/page-header.component.scss | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html index 7061da3a..af1bf688 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html @@ -24,8 +24,8 @@
-

{{ header }}

-

{{ subheader }}

+

{{ header }}

+

{{ subheader }}

diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.scss b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.scss index e3941bbc..27d1dee6 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.scss +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.scss @@ -57,13 +57,13 @@ justify-content: center; flex-direction: column; } - h3 { + h1 { font-size: 1em; font-weight: 700; margin: 0px; padding: 0px; } - h4 { + h2 { font-size: 1em; font-weight: 400; margin: 0px; From b32762aa1231fdaab1c89b155ea9a3d71e9ea6b8 Mon Sep 17 00:00:00 2001 From: markuczy Date: Thu, 29 Feb 2024 10:53:51 +0100 Subject: [PATCH 07/13] feat: column selector buttons labeled properly --- libs/portal-integration-angular/assets/i18n/de.json | 10 ++++++++++ libs/portal-integration-angular/assets/i18n/en.json | 10 ++++++++++ .../custom-group-column-selector.component.html | 8 ++++++++ 3 files changed, 28 insertions(+) diff --git a/libs/portal-integration-angular/assets/i18n/de.json b/libs/portal-integration-angular/assets/i18n/de.json index ffebcac7..d87a0053 100644 --- a/libs/portal-integration-angular/assets/i18n/de.json +++ b/libs/portal-integration-angular/assets/i18n/de.json @@ -15,6 +15,16 @@ "NO": "Nein", "LEFT": "Links", "RIGHT": "Rechts" + }, + "ARIA_LABELS": { + "UP": "Move column up", + "TOP": "Move column to the top", + "DOWN": "Move column down", + "BOTTOM": "Move column to the bottom", + "RIGHT": "Set column as active", + "ALL_RIGHT": "Set all columns as active", + "LEFT": "Set column as inactive", + "ALL_LEFT": "Set all columns as inactive" } }, "OCX_SEARCH_CONFIG": { diff --git a/libs/portal-integration-angular/assets/i18n/en.json b/libs/portal-integration-angular/assets/i18n/en.json index 04be9833..00da2a88 100644 --- a/libs/portal-integration-angular/assets/i18n/en.json +++ b/libs/portal-integration-angular/assets/i18n/en.json @@ -15,6 +15,16 @@ "NO": "No", "LEFT": "Left", "RIGHT": "Right" + }, + "ARIA_LABELS": { + "UP": "Move column up", + "TOP": "Move column to the top", + "DOWN": "Move column down", + "BOTTOM": "Move column to the bottom", + "RIGHT": "Set column as active", + "ALL_RIGHT": "Set all columns as active", + "LEFT": "Set column as inactive", + "ALL_LEFT": "Set all columns as inactive" } }, "OCX_SEARCH_CONFIG": { diff --git a/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html b/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html index bff1d319..f8f87bdd 100644 --- a/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html @@ -24,6 +24,14 @@ [responsive]="false" [sourceStyle]="{ height: '300px' }" [targetStyle]="{ height: '300px' }" + [upButtonAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.UP' | translate)" + [topButtonAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.TOP' | translate)" + [downButtonAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.DOWN' | translate)" + [bottomButtonAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.BOTTOM' | translate)" + [rightButtonAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.RIGHT' | translate)" + [allRightButtonAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.ALL_RIGHT' | translate)" + [leftButtonAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.LEFT' | translate)" + [allLeftButtonAriaLabel]="('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.ALL_LEFT' | translate)" >
{{ item.nameKey | translate }}
From 5ad8a5c912a677c5bbf5594ae6d55cce4581d688 Mon Sep 17 00:00:00 2001 From: markuczy Date: Thu, 29 Feb 2024 11:10:13 +0100 Subject: [PATCH 08/13] feat: column selector dialog close button uses label properly --- libs/portal-integration-angular/assets/i18n/de.json | 3 ++- libs/portal-integration-angular/assets/i18n/en.json | 3 ++- .../custom-group-column-selector.component.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/portal-integration-angular/assets/i18n/de.json b/libs/portal-integration-angular/assets/i18n/de.json index d87a0053..3ef488c9 100644 --- a/libs/portal-integration-angular/assets/i18n/de.json +++ b/libs/portal-integration-angular/assets/i18n/de.json @@ -24,7 +24,8 @@ "RIGHT": "Set column as active", "ALL_RIGHT": "Set all columns as active", "LEFT": "Set column as inactive", - "ALL_LEFT": "Set all columns as inactive" + "ALL_LEFT": "Set all columns as inactive", + "CLOSE": "Close dialog" } }, "OCX_SEARCH_CONFIG": { diff --git a/libs/portal-integration-angular/assets/i18n/en.json b/libs/portal-integration-angular/assets/i18n/en.json index 00da2a88..6f7d5aca 100644 --- a/libs/portal-integration-angular/assets/i18n/en.json +++ b/libs/portal-integration-angular/assets/i18n/en.json @@ -24,7 +24,8 @@ "RIGHT": "Set column as active", "ALL_RIGHT": "Set all columns as active", "LEFT": "Set column as inactive", - "ALL_LEFT": "Set all columns as inactive" + "ALL_LEFT": "Set all columns as inactive", + "CLOSE": "Close dialog" } }, "OCX_SEARCH_CONFIG": { diff --git a/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html b/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html index f8f87bdd..9f97f294 100644 --- a/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/custom-group-column-selector/custom-group-column-selector.component.html @@ -8,7 +8,7 @@ [ariaLabel]="openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_TITLE' | translate)" > - + {{ dialogTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.DIALOG_TITLE' | translate) }} Date: Thu, 29 Feb 2024 11:19:52 +0100 Subject: [PATCH 09/13] fix: translations fix for column selector buttons --- libs/portal-integration-angular/assets/i18n/en.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/portal-integration-angular/assets/i18n/en.json b/libs/portal-integration-angular/assets/i18n/en.json index 6f7d5aca..19e8d17c 100644 --- a/libs/portal-integration-angular/assets/i18n/en.json +++ b/libs/portal-integration-angular/assets/i18n/en.json @@ -21,10 +21,10 @@ "TOP": "Move column to the top", "DOWN": "Move column down", "BOTTOM": "Move column to the bottom", - "RIGHT": "Set column as active", - "ALL_RIGHT": "Set all columns as active", - "LEFT": "Set column as inactive", - "ALL_LEFT": "Set all columns as inactive", + "RIGHT": "Set column as inactive", + "ALL_RIGHT": "Set all columns as inactive", + "LEFT": "Set column as active", + "ALL_LEFT": "Set all columns as active", "CLOSE": "Close dialog" } }, From 83c19ff2f2a01038e5a75043baedd51fd789c8e7 Mon Sep 17 00:00:00 2001 From: markuczy Date: Mon, 4 Mar 2024 13:50:02 +0100 Subject: [PATCH 10/13] feat: filter selection aria label set --- .../lib/core/components/data-table/data-table.component.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/portal-integration-angular/src/lib/core/components/data-table/data-table.component.html b/libs/portal-integration-angular/src/lib/core/components/data-table/data-table.component.html index 28b4d3d3..2b146d27 100644 --- a/libs/portal-integration-angular/src/lib/core/components/data-table/data-table.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/data-table/data-table.component.html @@ -103,7 +103,7 @@
- {{ column.nameKey | translate }} + {{ column.nameKey | translate }}
filter.columnId === columnId).map((filter) => filter.value) } - sortIconTitle() { - switch (this.sortDirection) { + sortIconTitle(sortColumn: string) { + return this.sortDirectionToTitle( + sortColumn !== this.sortDirection + ? DataSortDirection.NONE + : this.sortStates[this.sortStates.indexOf(this.sortDirection) % this.sortStates.length] + ) + } + + sortDirectionToTitle(sortDirection: DataSortDirection) { + switch (sortDirection) { case DataSortDirection.ASCENDING: - return 'OCX_LIST_GRID_SORT.TOGGLE_BUTTON.ASCENDING_TITLE' + return 'OCX_DATA_TABLE.TOGGLE_BUTTON.ASCENDING_TITLE' case DataSortDirection.DESCENDING: - return 'OCX_LIST_GRID_SORT.TOGGLE_BUTTON.DESCENDING_TITLE' + return 'OCX_DATA_TABLE.TOGGLE_BUTTON.DESCENDING_TITLE' default: - return 'OCX_LIST_GRID_SORT.TOGGLE_BUTTON.DEFAULT_TITLE' + return 'OCX_DATA_TABLE.TOGGLE_BUTTON.DEFAULT_TITLE' } } diff --git a/libs/portal-integration-angular/src/lib/core/components/data-view-controls/data-view-controls.component.html b/libs/portal-integration-angular/src/lib/core/components/data-view-controls/data-view-controls.component.html index b70d0f88..797784cf 100644 --- a/libs/portal-integration-angular/src/lib/core/components/data-view-controls/data-view-controls.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/data-view-controls/data-view-controls.component.html @@ -27,7 +27,7 @@ type="button" (click)="toggleColumns()" pButton - [title]="translations?.toggleColumnButtonTooltip || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_TITLE' | translate)" + [title]="translations?.toggleColumnButtonTooltip || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)" icon="pi pi-cog" >
diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html index 5a71fb5a..88c7a1a0 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.html @@ -4,7 +4,7 @@ [model]="items" *ngIf="breadcrumbs$ | async as items" [home]="(home$ | async)?.menuItem ?? {}" - [homeAriaLabel]="(home$ | async)?.ariaLabel ?? 'OCX_PAGE_HEADER.HOME' | translate" + [homeAriaLabel]="(home$ | async)?.page ? ('OCX_PAGE_HEADER.HOME_ARIA_LABEL' | translate: { page: (home$ | async)?.page}) : ('OCX_PAGE_HEADER.HOME_DEFAULT_ARIA_LABEL' | translate)" [attr.manual]="manualBreadcrumbs" > @@ -65,6 +65,7 @@

{{ subheader }}

class="more-actions-menu-button action-button ml-2" (click)="menu.toggle($event)" name="ocx-page-header-overflow-action-button" + [ariaLabel]="('OCX_PAGE_HEADER.MORE_ACTIONS' | translate)" >
diff --git a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts index 992f2c12..4ad11e35 100644 --- a/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts +++ b/libs/portal-integration-angular/src/lib/core/components/page-header/page-header.component.ts @@ -55,7 +55,7 @@ export interface ObjectDetailItem { export interface HomeItem { menuItem: MenuItem - ariaLabel?: string + page?: string } @Component({ @@ -137,7 +137,7 @@ export class PageHeaderComponent implements OnInit, OnChanges { icon: PrimeIcons.HOME, routerLink: portal.baseUrl, }, - ariaLabel: portal.portalName, + page: portal.portalName, })) ) ) From 9b1285acfdb342587f54c49aaa30e69ee99509dc Mon Sep 17 00:00:00 2001 From: markuczy Date: Tue, 5 Mar 2024 14:34:11 +0100 Subject: [PATCH 12/13] feat: german translations --- .../assets/i18n/de.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libs/portal-integration-angular/assets/i18n/de.json b/libs/portal-integration-angular/assets/i18n/de.json index c99840e5..4e67be79 100644 --- a/libs/portal-integration-angular/assets/i18n/de.json +++ b/libs/portal-integration-angular/assets/i18n/de.json @@ -17,15 +17,15 @@ "RIGHT": "Rechts" }, "ARIA_LABELS": { - "UP": "Move column up", - "TOP": "Move column to the top", - "DOWN": "Move column down", - "BOTTOM": "Move column to the bottom", - "RIGHT": "Set column as active", - "ALL_RIGHT": "Set all columns as active", - "LEFT": "Set column as inactive", - "ALL_LEFT": "Set all columns as inactive", - "CLOSE": "Close dialog" + "UP": "Spalte nach oben verschieben", + "TOP": "Spalte an den Anfang verschieben", + "DOWN": "Spalte nach unten verschieben", + "BOTTOM": "Spalte ans Ende verschieben", + "RIGHT": "Spalte als aktiv setzen", + "ALL_RIGHT": "Alle Spalten als aktiv setzen", + "LEFT": "Spalte als inaktiv setzen", + "ALL_LEFT": "Alle Spalten als inaktiv setzen", + "CLOSE": "Dialog schließen" } }, "OCX_SEARCH_CONFIG": { @@ -43,7 +43,7 @@ "DESCENDING_TITLE": "Absteigend", "DEFAULT_TITLE": "Standard" }, - "SORTING_BUTTON_ARIA_LABEL": "Toggle sorting direction to {{direction}}" + "SORTING_BUTTON_ARIA_LABEL": "{{direction}} sortieren" }, "OCX_DATA_TABLE": { "EMPTY_RESULT": "Keine Daten gefunden.", @@ -61,10 +61,10 @@ "DELETE": "Löschen" }, "TOGGLE_BUTTON": { - "ASCENDING_TITLE": "Ascending", - "DESCENDING_TITLE": "Descending", - "DEFAULT_TITLE": "Default", - "ARIA_LABEL": "Toggle {{column}} sorting direction to {{direction}}" + "ASCENDING_TITLE": "Auftseigend", + "DESCENDING_TITLE": "Absteigend", + "DEFAULT_TITLE": "Standard", + "ARIA_LABEL": "{{column}} {{direction}} sortieren" } }, "OCX_DATA_LIST_GRID": { @@ -115,8 +115,8 @@ }, "OCX_PAGE_HEADER": { "MORE_ACTIONS": "Weitere Aktionen", - "HOME_DEFAULT_ARIA_LABEL": "Go to home page", - "HOME_ARIA_LABEL": "Go to {{page}} home page" + "HOME_DEFAULT_ARIA_LABEL": "Zur Startseite navigieren", + "HOME_ARIA_LABEL": "Zu {{page}} navigieren" }, "OCX_HEADER": { "MENU_TOGGLE": "Menü" From 23ed2ec319acca09d0039a7ff995813248c3f7a3 Mon Sep 17 00:00:00 2001 From: markuczy Date: Tue, 5 Mar 2024 14:44:16 +0100 Subject: [PATCH 13/13] fix: german translations fix --- libs/portal-integration-angular/assets/i18n/de.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/portal-integration-angular/assets/i18n/de.json b/libs/portal-integration-angular/assets/i18n/de.json index 4e67be79..248be0d9 100644 --- a/libs/portal-integration-angular/assets/i18n/de.json +++ b/libs/portal-integration-angular/assets/i18n/de.json @@ -21,10 +21,10 @@ "TOP": "Spalte an den Anfang verschieben", "DOWN": "Spalte nach unten verschieben", "BOTTOM": "Spalte ans Ende verschieben", - "RIGHT": "Spalte als aktiv setzen", - "ALL_RIGHT": "Alle Spalten als aktiv setzen", - "LEFT": "Spalte als inaktiv setzen", - "ALL_LEFT": "Alle Spalten als inaktiv setzen", + "RIGHT": "Spalte als inaktiv setzen", + "ALL_RIGHT": "Alle Spalten als inaktiv setzen", + "LEFT": "Spalte als aktiv setzen", + "ALL_LEFT": "Alle Spalten als aktiv setzen", "CLOSE": "Dialog schließen" } }, @@ -39,7 +39,7 @@ "TITLE": "Sortieren nach" }, "TOGGLE_BUTTON": { - "ASCENDING_TITLE": "Auftseigend", + "ASCENDING_TITLE": "Aufsteigend", "DESCENDING_TITLE": "Absteigend", "DEFAULT_TITLE": "Standard" }, @@ -61,7 +61,7 @@ "DELETE": "Löschen" }, "TOGGLE_BUTTON": { - "ASCENDING_TITLE": "Auftseigend", + "ASCENDING_TITLE": "Aufsteigend", "DESCENDING_TITLE": "Absteigend", "DEFAULT_TITLE": "Standard", "ARIA_LABEL": "{{column}} {{direction}} sortieren"