Skip to content

fix(a11y): default dangerDescription to empty string#22121

Merged
kennylam merged 10 commits into
carbon-design-system:mainfrom
tay1orjones:task/danger-description-empty-default
May 20, 2026
Merged

fix(a11y): default dangerDescription to empty string#22121
kennylam merged 10 commits into
carbon-design-system:mainfrom
tay1orjones:task/danger-description-empty-default

Conversation

@tay1orjones

Copy link
Copy Markdown
Member

Closes #20515

Changelog

New

  • Add dangerDescription to components that utilize danger buttons

Changed

  • Default dangerDescription to an empty string in react and web components
  • Update modal, dialog, and composed modal wrappers plus related tests and snapshots

Testing / Reviewing

  • dangerDescription should be configurable in the impacted stories

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
    - [ ] Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@netlify

netlify Bot commented Apr 24, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 21808aa
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69ebd75f7a5dce0008b80ed7
😎 Deploy Preview https://deploy-preview-22121--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 24, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 21808aa
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69ebd761e1185000084f6361
😎 Deploy Preview https://deploy-preview-22121--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 24, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit c9fc9c0
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69fe314922bfc100088e7f66
😎 Deploy Preview https://deploy-preview-22121--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 24, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit c9fc9c0
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69fe314999f2e300085c5323
😎 Deploy Preview https://deploy-preview-22121--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.10%. Comparing base (9009855) to head (c9fc9c0).
⚠️ Report is 63 commits behind head on main.

Files with missing lines Patch % Lines
...es/web-components/src/components/menu/menu-item.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #22121      +/-   ##
==========================================
+ Coverage   95.05%   95.10%   +0.05%     
==========================================
  Files         539      549      +10     
  Lines       45156    45664     +508     
  Branches     6493     6599     +106     
==========================================
+ Hits        42922    43430     +508     
+ Misses       2105     2104       -1     
- Partials      129      130       +1     
Flag Coverage Δ
main-packages 89.15% <100.00%> (+0.03%) ⬆️
web-components 97.90% <93.75%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wkeese

wkeese commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Wow that was fast. This looks great to me.

Comment thread packages/web-components/src/components/button/button.ts Outdated
Co-authored-by: Tom Brunet <thbrunet@us.ibm.com>

@kennylam kennylam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good. Just a small change for button's aria-describedby.

Comment thread packages/web-components/src/components/button/button.ts Outdated

@emyarod emyarod left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! the deploy previews weren't loading for me but tested locally

@kennylam kennylam added this pull request to the merge queue May 20, 2026
Merged via the queue into carbon-design-system:main with commit e3656c5 May 20, 2026
39 checks passed
@carbon-automation

Copy link
Copy Markdown
Contributor

Hey there! v11.108.0 was just released that references this issue/PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[a11y]: Danger modal - screen reader announces "danger" on button.

5 participants