From 618cf726d8deda5a5474cdb5cf0235a33d12ae5b Mon Sep 17 00:00:00 2001 From: Taneli Tuomola Date: Tue, 30 Jan 2024 15:07:51 +0200 Subject: [PATCH] fix #14608 p-ColumnFilter aria-label --- src/app/components/api/translationkeys.ts | 4 ++-- src/app/components/table/table.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/components/api/translationkeys.ts b/src/app/components/api/translationkeys.ts index 2c93a0ea02e..ca48602cfa6 100644 --- a/src/app/components/api/translationkeys.ts +++ b/src/app/components/api/translationkeys.ts @@ -41,7 +41,7 @@ export class TranslationKeys { public static readonly PASSWORD_PROMPT = 'passwordPrompt'; public static readonly EMPTY_MESSAGE = 'emptyMessage'; public static readonly EMPTY_FILTER_MESSAGE = 'emptyFilterMessage'; - public static readonly SHOW_FILTER_MENU = 'Show Filter Menu'; - public static readonly HIDE_FILTER_MENU = 'Hide Filter Menu'; + public static readonly SHOW_FILTER_MENU = 'showFilterMenu'; + public static readonly HIDE_FILTER_MENU = 'hideFilterMenu'; public static readonly SELECTION_MESSAGE = '{0} items selected'; } diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index a62e121015a..b8ca42d36b5 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -4945,7 +4945,7 @@ export class ReorderableRow implements AfterViewInit { type="button" class="p-column-filter-menu-button p-link" aria-haspopup="true" - [attr.aria-label]="showMenuButtonLabel" + [attr.aria-label]="filterMenuButtonAriaLabel" [attr.aria-controls]="overlayId" [attr.aria-expanded]="overlayVisible" [ngClass]="{ 'p-column-filter-menu-button-open': overlayVisible, 'p-column-filter-menu-button-active': hasFilter() }" @@ -5277,7 +5277,7 @@ export class ColumnFilter implements AfterContentInit { } get filterMenuButtonAriaLabel() { - return this.config.translation ? (this.overlayVisible ? this.config.translation.aria.showFilterMenu : this.config.translation.aria.hideFilterMenu) : undefined; + return this.config.translation ? (this.overlayVisible ? this.config.translation.aria.hideFilterMenu : this.config.translation.aria.showFilterMenu) : undefined; } get removeRuleButtonAriaLabel() {