Skip to content
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

[a11y]: ActionableNotification aria-label should have more flexibility #14605

Closed
2 tasks done
finken2 opened this issue Sep 8, 2023 · 0 comments · Fixed by #14609
Closed
2 tasks done

[a11y]: ActionableNotification aria-label should have more flexibility #14605

finken2 opened this issue Sep 8, 2023 · 0 comments · Fixed by #14609

Comments

@finken2
Copy link
Contributor

finken2 commented Sep 8, 2023

Package

@carbon/react

Browser

Chrome

Operating System

MacOS

Package version

1.37.0

React version

17

Automated testing tool and ruleset

IBM accessibility checker

Assistive technology

No response

Description

We had an a11y issue opened:
“Interactive component with ARIA role 'alertdialog' does not have a programmatically associated name”

This boiled down to the fact that we have an ActionableNotification with no title (just a subtitle). The ActionableNotification code ties the aria-labelledby to the title, so if you don't have a title, you end up with this issue.
code link

It would be nice to have a bit more flexibility, so you could have a notification without title and not have an accessibility violation. Basically, fall back to the subtitle if there's no title. We'd need to add an id to the subtitle div and point to that in this case. (there's other options too of course, but that seems logical. Could also have a hideTitle or a separate prop for another aria-label)

We went ahead and added a title to our ActionableNotification for now to resolve the issue, but we shouldn't have to do that.

WCAG 2.1 Violation

No response

Reproduction/example

see description

Steps to reproduce

see description

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants