feat(cds-dialog): new preview component#21853
Merged
maradwan26 merged 38 commits intoApr 8, 2026
Merged
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21853 +/- ##
==========================================
- Coverage 94.93% 94.90% -0.03%
==========================================
Files 541 541
Lines 45192 45250 +58
Branches 6372 6331 -41
==========================================
+ Hits 42903 42946 +43
- Misses 2157 2172 +15
Partials 132 132
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
adamalston
reviewed
Mar 18, 2026
Contributor
Author
|
|
heloiselui
reviewed
Apr 2, 2026
adamalston
approved these changes
Apr 7, 2026
Merged
via the queue into
carbon-design-system:main
with commit Apr 8, 2026
7988f34
39 checks passed
MarianaAa01
pushed a commit
to MarianaAa01/carbon
that referenced
this pull request
May 29, 2026
* feat(dialog): new wc preview component * fix: footer elements selector * fix: align stories * fix(react): update scrolling content handling * chore: export as preview * fix: formatting * fix: remove legacy test * fix: deprecate ariaLabel * docs: sync react and wc stories * chore: update snapshots * chore: cleanup and formatting * chore: cleanup * fix: esc key handling and selector override * test: update tests * fix: ts * fix: a11y * refactor: remove uneccesary aria-label prop * chore: cleanup * chore: cleanup aria-labelledby * docs: dialog markdown cdn * refactor: extend class * fix: prevent close on esc for non-modal dialog * test: label handling * Update packages/react/src/components/Dialog/Dialog.tsx Co-authored-by: Adam Alston <aalston9@gmail.com> * fix: derive body label from custom id * refactor: types, set labels on render * fix(a11y): apply proper labelling and role on scroll container * refactor: aria-labelledby title fallback * chore: cleanup * fix(esc): add !open guard * fix(body): scope userDefinedTabindex guard to tabindex only * docs: add see preview reference * chore: remove preview prefix from export --------- Co-authored-by: Adam Alston <aalston9@gmail.com> Co-authored-by: Heloise Lui <71858203+heloiselui@users.noreply.github.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #20539
Closes #20973
Adds new preview component
cds-dialogto Carbon Web Components, matching its React counterpart preview__Dialog.Changelog
New
cds-dialog,cds-dialog-title,cds-dialog-footer, etc. and respective logic, styles, and storiesprevent-close-on-click-outsidesince it's also in modal as I figured users would expect to find it here toopreview__CDSDialog,preview__CDSDialogTitle, etc. from the centralindex.tsaria-labelandaria-labelledbyChanged
modal.tsto allow for overridingbutton.scssto supportcds-dialog-footer-buttonresizeObserverand also remove the gradient when the container is small viacds--dialog-scroll-content--no-fade. This matches the implementation inModalandComposedModalariaLabel,ariaLabelledBy, andariaDescribedByin favour ofaria-label,aria-labelledby, andaria-describedbyrespectivelyElement with "region" role does not have a labelTesting / Reviewing
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
[ ] Wrote passing tests that cover this change