From 739d3df38e552fe8c55d83a263fcc0a859e59674 Mon Sep 17 00:00:00 2001 From: Srinivas Padidapelli Date: Thu, 5 Dec 2024 20:24:13 +0530 Subject: [PATCH] fix(a11y): signpost close aria label update and allow user to config aria label (#1624) ## PR Checklist Please check if your PR fulfills the following requirements: - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) - [ ] If applicable, have a visual design approval ## PR Type What kind of change does this PR introduce? - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## What is the current behavior? Issue Number: CDE-2461 ## What is the new behavior? ## Does this PR introduce a breaking change? - [ ] Yes - [x] No ## Other information --------- Co-authored-by: Srinivas Padidapelli Co-authored-by: GitHub Co-authored-by: Srinivas Padidapelli --- .storybook/stories/signpost/signpost.stories.ts | 3 ++- projects/angular/clarity.api.md | 4 +++- projects/angular/src/popover/signpost/signpost-content.ts | 4 +++- projects/angular/src/utils/i18n/common-strings.default.ts | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.storybook/stories/signpost/signpost.stories.ts b/.storybook/stories/signpost/signpost.stories.ts index e97509541e..39b267c771 100644 --- a/.storybook/stories/signpost/signpost.stories.ts +++ b/.storybook/stories/signpost/signpost.stories.ts @@ -44,6 +44,7 @@ export default { args: { // inputs clrPosition: 'right-middle', + clrSignpostCloseAriaLabel: 'Info Close', // story helpers content: 'Hello World!', }, @@ -52,7 +53,7 @@ export default { const template = `
- + {{ content }} diff --git a/projects/angular/clarity.api.md b/projects/angular/clarity.api.md index b31353cfa7..4ef3dac9a9 100644 --- a/projects/angular/clarity.api.md +++ b/projects/angular/clarity.api.md @@ -3633,9 +3633,11 @@ export class ClrSignpostContent extends AbstractPopover implements OnDestroy { get position(): string; set position(position: string); // (undocumented) + signpostCloseAriaLabel: string; + // (undocumented) signpostContentId: string; // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } diff --git a/projects/angular/src/popover/signpost/signpost-content.ts b/projects/angular/src/popover/signpost/signpost-content.ts index 7ca952bd56..6da43a4323 100644 --- a/projects/angular/src/popover/signpost/signpost-content.ts +++ b/projects/angular/src/popover/signpost/signpost-content.ts @@ -40,7 +40,7 @@ const POSITIONS: string[] = [