Skip to content

feat: Update Toast and Tooltip styles to match Sana#4053

Open
RayRedGoose wants to merge 5 commits into
Workday:prerelease/majorfrom
RayRedGoose:issue3989_toast-tooltip
Open

feat: Update Toast and Tooltip styles to match Sana#4053
RayRedGoose wants to merge 5 commits into
Workday:prerelease/majorfrom
RayRedGoose:issue3989_toast-tooltip

Conversation

@RayRedGoose

@RayRedGoose RayRedGoose commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes: #3989

Update Toast and Tooltip styles to match Sana

Release Category

Components


Checklist

For the Reviewer

  • PR title is short and descriptive
  • PR summary describes the change (Fixes/Resolves linked correctly)
  • PR Release Notes describes additional information useful to call out in a release message or removed if not applicable
  • Breaking Changes provides useful information to upgrade to this code or removed if not applicable

Where Should the Reviewer Start?

Areas for Feedback? (optional)

  • Code
  • Documentation
  • Testing
  • Codemods

Testing Manually

Screenshots or GIFs (if applicable)

Thank You Gif (optional)

Summary by CodeRabbit

  • Documentation

    • Updated the v16 upgrade guide with new Toast and Tooltip sections, including visual update notes.
    • Extended KBD story documentation with an “In Tooltip” usage section.
  • New Features

    • Added a KBD in Tooltip Storybook example demonstrating a copy-to-clipboard tooltip with a keyboard shortcut hint.
  • Bug Fixes

    • Refreshed Toast visuals (spacing, shape, borders/shadows) and improved close icon positioning/sizing.
    • Refreshed Tooltip visuals (surface/border styling, padding/typography, and focus behavior).
    • Updated Toast icon colors in examples to use the latest brand color styling.

@RayRedGoose RayRedGoose requested a review from a team as a code owner July 8, 2026 18:52
Copilot AI review requested due to automatic review settings July 8, 2026 18:52
@RayRedGoose RayRedGoose added the ready for review Code is ready for review label Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3d900634-7a33-451a-8106-26d4cc211934

📥 Commits

Reviewing files that changed from the base of the PR and between e2df3a9 and 7c051ec.

📒 Files selected for processing (6)
  • modules/react/toast/stories/examples/Basic.tsx
  • modules/react/toast/stories/examples/RTL.tsx
  • modules/react/toast/stories/examples/ToastAlert.tsx
  • modules/react/toast/stories/examples/ToastDialog.tsx
  • modules/react/toast/stories/examples/WithActionLinkAndCloseIcon.tsx
  • modules/react/toast/stories/examples/WithPopper.tsx
✅ Files skipped from review due to trivial changes (3)
  • modules/react/toast/stories/examples/RTL.tsx
  • modules/react/toast/stories/examples/WithActionLinkAndCloseIcon.tsx
  • modules/react/toast/stories/examples/WithPopper.tsx

📝 Walkthrough

Walkthrough

Toast and Tooltip are restyled with updated v16 tokens and layout values. KBD adds an “In Tooltip” example and story, and the v16 upgrade guides add Toast and Tooltip sections describing the visual changes.

Changes

Toast and Tooltip visual updates

Layer / File(s) Summary
Toast stencil and examples
modules/react/toast/lib/Toast.tsx, modules/react/toast/lib/ToastBody.tsx, modules/react/toast/lib/ToastCloseIcon.tsx, modules/react/toast/lib/ToastIcon.tsx, modules/react/toast/stories/examples/*
Toast container, body, close icon, and icon styling switch to updated token values, and Toast story examples update icon colors to the new brand tokens.
Tooltip container restyling
modules/react/tooltip/lib/TooltipContainer.tsx
Tooltip base and focused styles change to the new typography, surface, border, padding, and margin values.
KBD-in-Tooltip example and story
modules/labs-react/kbd/stories/examples/InTooltip.tsx, modules/labs-react/kbd/stories/KBD.stories.tsx, modules/labs-react/kbd/stories/KBD.mdx
A new InTooltip example renders a Tooltip with a KBD shortcut hint, and it is added to Storybook and KBD docs.
Upgrade guide documentation
modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md, modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
The upgrade guides add Toast and Tooltip entries and Visual Updates sections for the v16 styling changes.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

Suggested reviewers: williamjstanton, josh-bagwell

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The Tooltip Kbd slot and broader Popup token updates are missing, so #3989 is only partially implemented. Add the opt-in Tooltip Kbd slot, apply the requested Popup token updates, and confirm the v16 requirements are covered.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Clearly summarizes the main Toast and Tooltip style update.
Out of Scope Changes check ✅ Passed No clear out-of-scope changes; the docs and KBD story additions support the requested Toast/Tooltip work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates Toast and Tooltip component styling to align with Sana/v16 visual design, and documents these changes in the v16 upgrade guide. Also adds a KBD Storybook example demonstrating use of KBD within a Tooltip title.

Changes:

  • Restyles TooltipContainer (type level, padding, light surface + border, rounding, spacing).
  • Restyles Toast container and subcomponents (container padding/gap/border/shadow, icon sizing, close icon positioning/size, body spacing).
  • Adds KBD “In Tooltip” Storybook example and updates v16 upgrade guides (MDX + LLM copy) with Toast/Tooltip notes.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
modules/react/tooltip/lib/TooltipContainer.tsx Tooltip container visual/token updates for Sana styling
modules/react/toast/lib/Toast.tsx Toast container layout + v16 token styling (padding, border, surface, shadow)
modules/react/toast/lib/ToastBody.tsx Adjust Toast body spacing to match new container padding strategy
modules/react/toast/lib/ToastIcon.tsx Update Toast icon sizing approach
modules/react/toast/lib/ToastCloseIcon.tsx Update close icon positioning and size
modules/labs-react/kbd/stories/KBD.stories.tsx Adds new “InTooltip” story export
modules/labs-react/kbd/stories/KBD.mdx Documents new “In Tooltip” example usage
modules/labs-react/kbd/stories/examples/InTooltip.tsx New example showing KBD content within Tooltip title
modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx Adds Toast/Tooltip upgrade notes
modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md Mirrors upgrade notes for LLM docs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +74 to +78
borderRadius: system.legacy.shape.full,
border: `${px2rem(1)} solid ${system.color.border.default}`,
zIndex: -1,
margin: system.legacy.gap.xs,
backgroundColor: system.legacy.color.surface.contrast.default,
margin: 0,
backgroundColor: system.legacy.color.surface.default,
Comment on lines +24 to +35
<KBD aria-keyshortcuts="Command+P">
<KBD.Item>
<KBD variant="plain">
<KBD.Item>⌘</KBD.Item>
<KBD.Item>C</KBD.Item>
</KBD>
</KBD.Item>
</KBD>
</div>
}
>
<SecondaryButton icon={copyIcon} />
- `Toast.Body` no longer has a gap between text and link.
- `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.
- `Toast.Body` no longer has a gap between text and link.
- `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.

### Tooltip

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
modules/labs-react/kbd/stories/examples/InTooltip.tsx (1)

24-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Simplify the KBD nesting structure.

The current structure nests KBD inside KBD.Item inside an outer KBD, which is more complex than the documented pattern. The standard usage shown in KBD.mdx is a flat KBD with KBD.Item children. The outer KBD and its single KBD.Item wrapper add no visual or semantic value.

♻️ Proposed simplification
-          <KBD aria-keyshortcuts="Command+P">
-            <KBD.Item>
-              <KBD variant="plain">
-                <KBD.Item>⌘</KBD.Item>
-                <KBD.Item>C</KBD.Item>
-              </KBD>
-            </KBD.Item>
-          </KBD>
+          <KBD variant="plain">
+            <KBD.Item aria-label="Command">⌘</KBD.Item>
+            <KBD.Item>C</KBD.Item>
+          </KBD>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/labs-react/kbd/stories/examples/InTooltip.tsx` around lines 24 - 31,
The KBD example uses an unnecessary nested wrapper pattern, with a KBD inside
KBD.Item inside an outer KBD, which should be simplified to the documented flat
KBD composition. Update the InTooltip story to use the KBD component directly
with KBD.Item children, removing the extra outer KBD and the single-item wrapper
while preserving the same displayed shortcut keys and aria-keyshortcuts
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md`:
- Around line 261-273: The Toast entry in the upgrade guide is missing the
standard PR reference used by other Component Updates sections. Update the Toast
section in the docs upgrade guide to include a matching PR link, following the
same `**PR:**` pattern as Avatar, Buttons, and Card so it is consistent and
traceable.

In `@modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx`:
- Around line 267-279: The Toast section under Component Updates is missing the
standard PR reference used by the other component entries. Update the Toast
subsection in the upgrade guide to include a matching `**PR:**` link for
traceability, consistent with the Avatar, Buttons, and Card sections, and place
it alongside the existing Toast notes so the section format stays uniform.

In `@modules/labs-react/kbd/stories/examples/InTooltip.tsx`:
- Around line 24-35: Update the InTooltip example to add accessible names where
assistive text is missing: in the KBD composition, give the glyph item for ⌘ an
aria-label with the spoken modifier name, and give the icon-only SecondaryButton
an aria-label that describes its action. Use the existing KBD and
SecondaryButton usages in InTooltip.tsx to locate the spots and keep the visible
UI unchanged.
- Around line 24-31: The shortcut metadata is attached to the wrong element and
uses the wrong value: in the InTooltip example, `aria-keyshortcuts` on the `KBD`
display should be changed to match the visual shortcut (`Command+C`), and the
actual `aria-keyshortcuts` should be moved onto the `SecondaryButton` control
that the shortcut activates. Update the `KBD`/`KBD.Item` tooltip markup
accordingly so the accessible shortcut exposed to assistive tech matches the
displayed keys and follows the documented pattern.

---

Nitpick comments:
In `@modules/labs-react/kbd/stories/examples/InTooltip.tsx`:
- Around line 24-31: The KBD example uses an unnecessary nested wrapper pattern,
with a KBD inside KBD.Item inside an outer KBD, which should be simplified to
the documented flat KBD composition. Update the InTooltip story to use the KBD
component directly with KBD.Item children, removing the extra outer KBD and the
single-item wrapper while preserving the same displayed shortcut keys and
aria-keyshortcuts behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e2eea64a-0a8c-46b2-8322-3f722ce09f5f

📥 Commits

Reviewing files that changed from the base of the PR and between df9a69a and e2df3a9.

📒 Files selected for processing (10)
  • modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md
  • modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
  • modules/labs-react/kbd/stories/KBD.mdx
  • modules/labs-react/kbd/stories/KBD.stories.tsx
  • modules/labs-react/kbd/stories/examples/InTooltip.tsx
  • modules/react/toast/lib/Toast.tsx
  • modules/react/toast/lib/ToastBody.tsx
  • modules/react/toast/lib/ToastCloseIcon.tsx
  • modules/react/toast/lib/ToastIcon.tsx
  • modules/react/tooltip/lib/TooltipContainer.tsx

Comment on lines +261 to +273
### Toast

#### Visual Updates

- Padding is now applied to the `Toast` container itself instead of being distributed across
`Toast.Body` and `Toast.Icon`.
- Gap between the icon, body, and close icon is now `base.size150` (12px).
- Shape uses `system.shape.xl`.
- `Toast.Body` no longer has a gap between text and link.
- `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add a PR: link to the Toast section.

Every other component section under "Component Updates" includes a **PR:** link (e.g., Avatar → #3981, Buttons → #4000, Card → #4014). The new Toast section omits this. Add the PR link for consistency and traceability.

📝 Suggested fix
 ### Toast
 
+**PR:** [`#4053`](https://github.com/Workday/canvas-kit/pull/4053)
+
 #### Visual Updates
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Toast
#### Visual Updates
- Padding is now applied to the `Toast` container itself instead of being distributed across
`Toast.Body` and `Toast.Icon`.
- Gap between the icon, body, and close icon is now `base.size150` (12px).
- Shape uses `system.shape.xl`.
- `Toast.Body` no longer has a gap between text and link.
- `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.
### Toast
**PR:** [`#4053`](https://github.com/Workday/canvas-kit/pull/4053)
#### Visual Updates
- Padding is now applied to the `Toast` container itself instead of being distributed across
`Toast.Body` and `Toast.Icon`.
- Gap between the icon, body, and close icon is now `base.size150` (12px).
- Shape uses `system.shape.xl`.
- `Toast.Body` no longer has a gap between text and link.
- `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md` around lines 261 -
273, The Toast entry in the upgrade guide is missing the standard PR reference
used by other Component Updates sections. Update the Toast section in the docs
upgrade guide to include a matching PR link, following the same `**PR:**`
pattern as Avatar, Buttons, and Card so it is consistent and traceable.

Comment on lines +267 to +279
### Toast

#### Visual Updates

- Padding is now applied to the `Toast` container itself instead of being distributed across
`Toast.Body` and `Toast.Icon`.
- Gap between the icon, body, and close icon is now `base.size150` (12px).
- Shape uses `system.shape.xl`.
- `Toast.Body` no longer has a gap between text and link.
- `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add a PR: link to the Toast section.

Every other component section under "Component Updates" includes a **PR:** link (e.g., Avatar → #3981, Buttons → #4000, Card → #4014). The new Toast section omits this. Add the PR link for consistency and traceability.

📝 Suggested fix
 ### Toast
 
+**PR:** [`#4053`](https://github.com/Workday/canvas-kit/pull/4053)
+
 #### Visual Updates
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Toast
#### Visual Updates
- Padding is now applied to the `Toast` container itself instead of being distributed across
`Toast.Body` and `Toast.Icon`.
- Gap between the icon, body, and close icon is now `base.size150` (12px).
- Shape uses `system.shape.xl`.
- `Toast.Body` no longer has a gap between text and link.
- `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.
### Toast
**PR:** [`#4053`](https://github.com/Workday/canvas-kit/pull/4053)
#### Visual Updates
- Padding is now applied to the `Toast` container itself instead of being distributed across
`Toast.Body` and `Toast.Icon`.
- Gap between the icon, body, and close icon is now `base.size150` (12px).
- Shape uses `system.shape.xl`.
- `Toast.Body` no longer has a gap between text and link.
- `Toast.CloseIcon` is set to have absolute positioning and aligned with the top-right corner (in
LTR).
- `Toast.CloseIcon` was changed to be `extra-small` tertiary button.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx` around lines 267 - 279, The Toast
section under Component Updates is missing the standard PR reference used by the
other component entries. Update the Toast subsection in the upgrade guide to
include a matching `**PR:**` link for traceability, consistent with the Avatar,
Buttons, and Card sections, and place it alongside the existing Toast notes so
the section format stays uniform.

Comment on lines +24 to +31
<KBD aria-keyshortcuts="Command+P">
<KBD.Item>
<KBD variant="plain">
<KBD.Item>⌘</KBD.Item>
<KBD.Item>C</KBD.Item>
</KBD>
</KBD.Item>
</KBD>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Fix aria-keyshortcuts value mismatch: "Command+P" vs visual ⌘C.

The aria-keyshortcuts attribute is set to "Command+P" but the visual keys display + C (Command+C). This mismatch will cause assistive technology to announce the wrong shortcut. It should be "Command+C".

Additionally, aria-keyshortcuts should be on the SecondaryButton (the control the shortcut triggers), not on the KBD display element inside the tooltip. The MDX documentation in this same PR (lines 106–121) explicitly states: "Expose the actual shortcut on the control it triggers."

🐛 Proposed fix
 export const InTooltip = () => {
   return (
     <Tooltip
       title={
         <div className={flexContainer}>
           <Subtext size="large">Copy to clipboard</Subtext>
-          <KBD aria-keyshortcuts="Command+P">
-            <KBD.Item>
-              <KBD variant="plain">
-                <KBD.Item>⌘</KBD.Item>
-                <KBD.Item>C</KBD.Item>
-              </KBD>
-            </KBD.Item>
-          </KBD>
+          <KBD variant="plain">
+            <KBD.Item aria-label="Command">⌘</KBD.Item>
+            <KBD.Item>C</KBD.Item>
+          </KBD>
         </div>
       }
     >
-      <SecondaryButton icon={copyIcon} />
+      <SecondaryButton icon={copyIcon} aria-label="Copy" aria-keyshortcuts="Command+C" />
     </Tooltip>
   );
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<KBD aria-keyshortcuts="Command+P">
<KBD.Item>
<KBD variant="plain">
<KBD.Item></KBD.Item>
<KBD.Item>C</KBD.Item>
</KBD>
</KBD.Item>
</KBD>
<KBD variant="plain">
<KBD.Item aria-label="Command"></KBD.Item>
<KBD.Item>C</KBD.Item>
</KBD>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/labs-react/kbd/stories/examples/InTooltip.tsx` around lines 24 - 31,
The shortcut metadata is attached to the wrong element and uses the wrong value:
in the InTooltip example, `aria-keyshortcuts` on the `KBD` display should be
changed to match the visual shortcut (`Command+C`), and the actual
`aria-keyshortcuts` should be moved onto the `SecondaryButton` control that the
shortcut activates. Update the `KBD`/`KBD.Item` tooltip markup accordingly so
the accessible shortcut exposed to assistive tech matches the displayed keys and
follows the documented pattern.

Comment on lines +24 to +35
<KBD aria-keyshortcuts="Command+P">
<KBD.Item>
<KBD variant="plain">
<KBD.Item>⌘</KBD.Item>
<KBD.Item>C</KBD.Item>
</KBD>
</KBD.Item>
</KBD>
</div>
}
>
<SecondaryButton icon={copyIcon} />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Accessibility gaps: missing aria-label on and on the icon-only button.

Two accessibility issues contradict the guidance documented in KBD.mdx:

  1. symbol lacks aria-label — The MDX (lines 89–94) states that glyphs like are not reliably announced and must have an aria-label with the spoken name (e.g., aria-label="Command").

  2. Icon-only SecondaryButton lacks aria-label — A button with only an icon and no text content is not accessible to screen reader users.

🛡️ Proposed fix
-          <KBD.Item>⌘</KBD.Item>
+          <KBD.Item aria-label="Command">⌘</KBD.Item>
-      <SecondaryButton icon={copyIcon} />
+      <SecondaryButton icon={copyIcon} aria-label="Copy" />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<KBD aria-keyshortcuts="Command+P">
<KBD.Item>
<KBD variant="plain">
<KBD.Item></KBD.Item>
<KBD.Item>C</KBD.Item>
</KBD>
</KBD.Item>
</KBD>
</div>
}
>
<SecondaryButton icon={copyIcon} />
<KBD aria-keyshortcuts="Command+P">
<KBD.Item>
<KBD variant="plain">
<KBD.Item aria-label="Command"></KBD.Item>
<KBD.Item>C</KBD.Item>
</KBD>
</KBD.Item>
</KBD>
</div>
}
>
<SecondaryButton icon={copyIcon} aria-label="Copy" />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/labs-react/kbd/stories/examples/InTooltip.tsx` around lines 24 - 35,
Update the InTooltip example to add accessible names where assistive text is
missing: in the KBD composition, give the glyph item for ⌘ an aria-label with
the spoken modifier name, and give the icon-only SecondaryButton an aria-label
that describes its action. Use the existing KBD and SecondaryButton usages in
InTooltip.tsx to locate the spots and keep the visible UI unchanged.

@cypress

cypress Bot commented Jul 8, 2026

Copy link
Copy Markdown

Workday/canvas-kit    Run #11222

Run Properties:  status check passed Passed #11222  •  git commit b4f5da1479 ℹ️: Merge 7c051ec04988aa45e6ff2cccea75ca40d2573476 into df9a69acd1329b7bc14a225dfbe4...
Project Workday/canvas-kit
Branch Review issue3989_toast-tooltip
Run status status check passed Passed #11222
Run duration 02m 30s
Commit git commit b4f5da1479 ℹ️: Merge 7c051ec04988aa45e6ff2cccea75ca40d2573476 into df9a69acd1329b7bc14a225dfbe4...
Committer Raisa Primerova
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 17
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 809
View all changes introduced in this branch ↗︎
UI Coverage  19.51%
  Untested elements 1541  
  Tested elements 371  
Accessibility  99.41%
  Failed rules  5 critical   5 serious   0 moderate   2 minor
  Failed elements 72  

@RayRedGoose RayRedGoose added the needs-a11y Extra attention from accessibility is needed label Jul 9, 2026
outline: `${px2rem(1)} solid transparent`,
outlineOffset: `-${px2rem(1)}`,
borderRadius: system.legacy.shape.full,
border: `${px2rem(1)} solid ${system.color.border.default}`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Do we want to use system.legacy.color.border.default instead here since it will then have a fallback value?

title={
<div className={flexContainer}>
<Subtext size="large">Copy to clipboard</Subtext>
<KBD aria-keyshortcuts="Command+P">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be Command+C?

padding: 0,
gap: system.legacy.gap.xs,
borderRadius: system.legacy.shape.xl,
paddingBlock: system.padding.sm,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Do we want to use system.legacy.* tokens for the padding, gap, border-radius, background color, and border here?

@sheelah sheelah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LG! Left just a few minor comments.

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

Labels

needs-a11y Extra attention from accessibility is needed ready for review Code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants