-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: (CXSPA-8997 & 8988) - Resolve Aria Issues in NavigationUIComponent #19782
base: develop
Are you sure you want to change the base?
Conversation
spartacus Run #46434
Run Properties:
|
Project |
spartacus
|
Branch Review |
feature/CXSPA-8997
|
Run status |
Passed #46434
|
Run duration | 04m 12s |
Commit |
277ea54d81 ℹ️: Merge e7617a2e629caccd466ef5db45984b5e54d4c746 into cc731978f9fb5748d79f11dd13a7...
|
Committer | petarmarkov9449 |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
3
|
Pending |
2
|
Skipped |
0
|
Passing |
125
|
View all changes introduced in this branch ↗︎ |
[attr.aria-haspopup]="true" | ||
[attr.aria-expanded]="false" | ||
[attr.aria-controls]="node.title" | ||
[attr.aria-describedby]="getAriaDescribedbyOfButton(node)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Returns the ID for the `aria-describedby` attribute of a button. | ||
*/ | ||
getAriaDescribedbyOfButton(node: NavigationNode): string | null { | ||
return node.title === 'My Account' ? 'greeting' : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, it doesn't seem right to use the title as an identifier of the node. If this aria described by is used only for my account navigation, maybe we can pass down some input from my-account-v2-navigation.component.ts
where <cx-navigation-ui>
is used. Thats just from the top of my head.
I'm not sure if using 'My Account' would work with i18n...
* Removes invalid aria-level usage on button elements and ensures buttons have a proper accessible name via aria-label or aria-labelledby. | ||
* Affects: NavigationUIComponent | ||
*/ | ||
a11yButtonAriaFixes?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should be more specific like a11yNavigationButtonsAriaFixes
Tickets: CXSPA-8997, CXSPA-8998
Removes invalid aria-level usage on button elements and ensures buttons have a proper accessible name via aria-label or aria-labelledby.
Affects: NavigationUIComponent