-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug]: <Button> does not correctly apply aria-describedby when used inside <Callout> (React Carbon) #19418
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
Comments
Hi @grek889 this issue seems to be caused by the fact that the If you pass in a regular button, it will render without the issue. Is there a particular use case for using icon only button within |
@grek889 is the icon only button you're referring to the close button on the right side of the screenshot you posted? If so, maybe you can use the |
Yes, I can use other components and implementations at the moment, but isn't it a bug that in the current implementation I can't use |
According to our design guidance, https://carbondesignsystem.com/components/notification/usage/#actions |
Package
@carbon/react
Browser
No response
Package version
1.80.0
React version
18.3.1
Description
When using a custom Button component that wraps Carbon’s Button inside a Callout, an accessibility error is thrown in Storybook:
Even though I pass aria-describedby explicitly to the custom Button, the rendered output seems to ignore or overwrite it.
Reproduction/example
https://stackblitz.com/edit/github-1qhjyknb?file=src%2FApp.tsx
Steps to reproduce
Create a wrapper component around Carbon’s and pass aria-describedby as a direct prop (not via ...rest).
Use this custom Button inside a Carbon component that also defines a title and titleId.
Pass the titleId as the value for aria-describedby in the Button:
4.Render this component.
Suggested Severity
None
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: