Skip to content

A11y: Ensure popover dialogs have an ARIA label#33500

Merged
Sidnioulz merged 8 commits into
storybookjs:nextfrom
gayanMatch:fix/A11y-Ensure-all-popovers-have-a-dialog-role-and-an-aria-label
Feb 19, 2026
Merged

A11y: Ensure popover dialogs have an ARIA label#33500
Sidnioulz merged 8 commits into
storybookjs:nextfrom
gayanMatch:fix/A11y-Ensure-all-popovers-have-a-dialog-role-and-an-aria-label

Conversation

@gayanMatch
Copy link
Copy Markdown
Contributor

@gayanMatch gayanMatch commented Jan 9, 2026

Closes #33494

What I did

Added accessibility improvements to PopoverProvider component:

  • Added ariaLabel prop that provides an accessible label for the popover dialog, announced by screen readers when the popover opens
  • Added deprecation warning when ariaLabel is not provided (will become mandatory in Storybook 11)
  • Automatically injects aria-haspopup="dialog" to trigger elements, informing assistive technology that the button opens a dialog
  • Updated all existing PopoverProvider usages in the codebase with appropriate aria labels
  • Updated MIGRATION.md with documentation for the new prop and behavior

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  1. Run yarn storybook:ui in the code directory
  2. Navigate to Overlay/PopoverProvider stories
  3. Open browser DevTools and inspect a trigger button
  4. Verify aria-haspopup="dialog" is present on the trigger
  5. Click the trigger to open the popover
  6. Verify aria-expanded="true" appears on the trigger when open
  7. Inspect the popover element and verify aria-label is set

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

Summary by CodeRabbit

  • New Features

    • Popovers now support an ariaLabel for improved accessibility; many popovers and stories include example labels.
    • Tooltip system reimplemented as TooltipProvider with a new triggerOnFocusOnly option and defaultVisible control.
  • Breaking Changes

    • WithTooltip public API simplified: removed trigger, interactive, followCursor, closeOnOutsideClick, closeOnTriggerHidden, withArrows, strategy, mutationObserverOptions, hasChrome.

Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=132382032

@gayanMatch gayanMatch marked this pull request as draft January 9, 2026 17:52
@gayanMatch gayanMatch marked this pull request as ready for review January 9, 2026 17:52
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds an optional ariaLabel prop to PopoverProvider (emits a deprecation notice when omitted), injects aria-haspopup="dialog" on trigger children, forwards aria-label to the upstream popover, updates many PopoverProvider call sites with contextual ariaLabel values, removes a manual aria-haspopup in TagsFilter, and documents WithTooltip → TooltipProvider API changes in MIGRATION.md.

Changes

Cohort / File(s) Summary
PopoverProvider core
code/core/src/components/components/Popover/PopoverProvider.tsx, code/core/src/components/components/Popover/PopoverProvider.stories.tsx
Add optional ariaLabel?: string prop; emit deprecation notice when missing; clone trigger child to add aria-haspopup="dialog"; forward aria-label to upstream Popover and set upstream container outline to none; story meta adds ariaLabel arg.
Migration / Tooltip API docs
MIGRATION.md
Document migration from WithTooltipTooltipProvider: rename startOpendefaultVisible, add triggerOnFocusOnly, and list removed props (trigger, svg, strategy, withArrows, mutationObserverOptions, hasChrome, closeOnTriggerHidden, followCursor, closeOnOutsideClick, interactive).
Docs & controls
code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx, code/addons/docs/src/blocks/controls/Color.tsx
Add contextual ariaLabel values to PopoverProvider usages (e.g., "Arg value details", "Color picker").
Manager sidebar components
code/core/src/manager/components/sidebar/...
code/core/src/manager/components/sidebar/Menu.tsx, .../ContextMenu.tsx, .../ChecklistWidget.tsx, .../RefBlocks.tsx, .../RefIndicator.tsx, .../TagsFilter.tsx
Add descriptive ariaLabel strings to multiple PopoverProvider usages (e.g., "Storybook menu", "Context menu", "Onboarding guide menu", "Error details", "Composed Storybook status") and remove a manual aria-haspopup from the TagsFilter toggle.
Manager preview, stories & tabs
code/core/src/manager/components/preview/tools/share.tsx, code/core/src/manager/container/Menu.stories.tsx, code/core/src/components/components/Tabs/Tabs.hooks.tsx, code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
Add ariaLabel to various PopoverProvider usages in stories and UI (e.g., "Share this story", "Menu", "Additional tabs", "Tooltip message").

Sequence Diagram(s)

(omitted — changes are accessibility additions and documentation updates without a multi-component control flow requiring sequence visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs


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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
MIGRATION.md (1)

630-643: Add a brief note about trigger prop-forwarding + consider adding these new subsections to the TOC

  • The “Automatic aria-haspopup” behavior (Line 642) will only work if the trigger element ultimately renders a DOM element that receives aria-* props (not just a forwarded ref). Consider a short note like: “If you use a custom trigger component, ensure it forwards aria-* props to the underlying DOM element.”
  • For discoverability/consistency with nearby sections, consider adding TOC entries for:
    • “Added: ariaLabel”
    • “Automatic aria-haspopup”
code/core/src/manager/components/sidebar/TagsFilter.tsx (1)

215-215: LGTM! Accessibility label added correctly.

The ariaLabel="Tag filters" provides an accessible name for the popover dialog. The PopoverProvider will now automatically inject aria-haspopup="dialog" on the trigger button.

💡 Optional: Consider differentiating the button and dialog labels

Both the trigger button (line 238) and the popover dialog use the same label "Tag filters". While functional, slightly different labels could provide clearer context:

  • Button: "Tag filters" (what the button does)
  • Popover: "Filter options" or "Tag filter panel" (what the dialog contains)

This is a minor refinement and the current implementation is acceptable.

code/core/src/components/components/Popover/PopoverProvider.tsx (1)

105-111: Consider removing the Pressable wrapper.

DialogTrigger from react-aria-components already manages trigger interactions and dialog state. Since all PopoverProvider children are interactive elements (Button, SidebarToggleButton, etc.) that forwarding refs correctly, the additional Pressable wrapper adds unnecessary indirection and may cause double-wrapping of press handlers. DialogTrigger should handle press interactions directly without needing an explicit Pressable wrapper around the child trigger.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9511a9c and f2c5ecf.

📒 Files selected for processing (15)
  • MIGRATION.md
  • code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/container/Menu.stories.tsx
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{js,jsx,ts,tsx,json,md,html,css,scss}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Format code using Prettier with yarn prettier --write <file>

Files:

  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
  • MIGRATION.md
**/*.{js,jsx,json,html,ts,tsx,mjs}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Run ESLint checks using yarn lint:js:cmd <file> or the full command cross-env NODE_ENV=production eslint --cache --cache-location=../.cache/eslint --ext .js,.jsx,.json,.html,.ts,.tsx,.mjs --report-unused-disable-directives to fix linting errors before committing

Files:

  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Enable TypeScript strict mode across all packages

Files:

  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx,js,jsx}: Export functions from modules if they need to be tested
Do not use console.log, console.warn, or console.error directly unless in isolated files where importing loggers would significantly increase bundle size

Files:

  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
code/{core,lib,addons,builders,frameworks,presets}/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use logger from storybook/internal/node-logger for server-side logging in Node.js code

Files:

  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
🧠 Learnings (7)
📓 Common learnings
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/components/components/Tabs/Tabs.stories.tsx:222-227
Timestamp: 2025-11-05T09:36:55.944Z
Learning: Repo: storybookjs/storybook PR: 32458 — In code/core/src/components/components/Button/Button.tsx (React/TypeScript), ButtonProps includes ariaLabel?: string | false and the component maps it to the DOM aria-label. Convention: ariaLabel is mandatory on all Button usages — provide a descriptive string for icon-only buttons; set ariaLabel=false when the button’s children already serve as the accessible name. Do not suggest using a raw aria-label prop on Button call sites.
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 33140
File: code/core/src/manager/components/sidebar/TagsFilter.tsx:247-259
Timestamp: 2025-11-25T11:09:33.798Z
Learning: In the storybookjs/storybook repository, PopoverProvider creates popovers with a dialog role, so using aria-haspopup="dialog" on buttons that trigger PopoverProvider is semantically correct.
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32594
File: code/core/src/components/components/Popover/WithPopover.tsx:7-9
Timestamp: 2025-10-01T15:24:01.060Z
Learning: In the Storybook repository, "react-aria-components/patched-dist/*" (e.g., "react-aria-components/patched-dist/Dialog", "react-aria-components/patched-dist/Popover", "react-aria-components/patched-dist/Tooltip") are valid import paths created by a patch applied to the react-aria-components package. These imports should not be flagged as broken or invalid until a maintainer explicitly states they are no longer acceptable.
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/components/components/tooltip/WithTooltip.tsx:54-96
Timestamp: 2025-11-05T09:37:25.920Z
Learning: Repo: storybookjs/storybook — In code/core/src/components/components/tooltip/WithTooltip.tsx, the legacy WithTooltip implementation is intentionally reintroduced for backward compatibility and is deprecated; maintainers (per Sidnioulz) do not want maintenance or improvements on it. Prefer WithTooltipNew/Popover; avoid suggesting changes to WithTooltip.* going forward.
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/manager/components/preview/Toolbar.tsx:102-105
Timestamp: 2025-10-03T07:55:42.639Z
Learning: In code/core/src/manager/components/preview/Toolbar.tsx, we intentionally do not add aria-label/aria-labelledby to StyledToolbar (AbstractToolbar) because the enclosing section is already labeled via an sr-only heading and the toolbar is the only content. Revisit only if real user testing indicates a need.
📚 Learning: 2025-11-05T09:36:55.944Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/components/components/Tabs/Tabs.stories.tsx:222-227
Timestamp: 2025-11-05T09:36:55.944Z
Learning: Repo: storybookjs/storybook PR: 32458 — In code/core/src/components/components/Button/Button.tsx (React/TypeScript), ButtonProps includes ariaLabel?: string | false and the component maps it to the DOM aria-label. Convention: ariaLabel is mandatory on all Button usages — provide a descriptive string for icon-only buttons; set ariaLabel=false when the button’s children already serve as the accessible name. Do not suggest using a raw aria-label prop on Button call sites.

Applied to files:

  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
  • MIGRATION.md
📚 Learning: 2025-11-25T11:09:33.798Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 33140
File: code/core/src/manager/components/sidebar/TagsFilter.tsx:247-259
Timestamp: 2025-11-25T11:09:33.798Z
Learning: In the storybookjs/storybook repository, PopoverProvider creates popovers with a dialog role, so using aria-haspopup="dialog" on buttons that trigger PopoverProvider is semantically correct.

Applied to files:

  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
  • MIGRATION.md
📚 Learning: 2025-10-03T07:55:42.639Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/manager/components/preview/Toolbar.tsx:102-105
Timestamp: 2025-10-03T07:55:42.639Z
Learning: In code/core/src/manager/components/preview/Toolbar.tsx, we intentionally do not add aria-label/aria-labelledby to StyledToolbar (AbstractToolbar) because the enclosing section is already labeled via an sr-only heading and the toolbar is the only content. Revisit only if real user testing indicates a need.

Applied to files:

  • code/addons/docs/src/blocks/controls/Color.tsx
  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/core/src/manager/components/sidebar/TagsFilter.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • MIGRATION.md
📚 Learning: 2025-11-05T09:37:25.920Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/components/components/tooltip/WithTooltip.tsx:54-96
Timestamp: 2025-11-05T09:37:25.920Z
Learning: Repo: storybookjs/storybook — In code/core/src/components/components/tooltip/WithTooltip.tsx, the legacy WithTooltip implementation is intentionally reintroduced for backward compatibility and is deprecated; maintainers (per Sidnioulz) do not want maintenance or improvements on it. Prefer WithTooltipNew/Popover; avoid suggesting changes to WithTooltip.* going forward.

Applied to files:

  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/ChecklistWidget.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/tooltip/TooltipMessage.stories.tsx
  • code/core/src/manager/components/sidebar/ContextMenu.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Tabs/Tabs.hooks.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/sidebar/Menu.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
  • MIGRATION.md
📚 Learning: 2025-10-01T15:24:01.060Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32594
File: code/core/src/components/components/Popover/WithPopover.tsx:7-9
Timestamp: 2025-10-01T15:24:01.060Z
Learning: In the Storybook repository, "react-aria-components/patched-dist/*" (e.g., "react-aria-components/patched-dist/Dialog", "react-aria-components/patched-dist/Popover", "react-aria-components/patched-dist/Tooltip") are valid import paths created by a patch applied to the react-aria-components package. These imports should not be flagged as broken or invalid until a maintainer explicitly states they are no longer acceptable.

Applied to files:

  • code/core/src/components/components/Popover/PopoverProvider.stories.tsx
  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/manager/container/Menu.stories.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • MIGRATION.md
📚 Learning: 2025-11-05T09:38:47.712Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32458
File: code/core/src/components/components/Select/Select.tsx:200-204
Timestamp: 2025-11-05T09:38:47.712Z
Learning: Repo: storybookjs/storybook — Guidance: Until Storybook 11 is released, do not suggest using React.useId anywhere (e.g., in code/core/src/components/components/Select/Select.tsx) to maintain compatibility with React 17 runtimes. Prefer advising: accept a caller-provided props.id and, if needed, generate a client-only fallback id to minimize SSR hydration issues — but avoid useId. Resume prompting for useId after Storybook 11.

Applied to files:

  • code/core/src/manager/components/sidebar/RefIndicator.tsx
  • code/core/src/components/components/Popover/PopoverProvider.tsx
  • code/core/src/manager/components/preview/tools/share.tsx
  • code/core/src/manager/components/sidebar/RefBlocks.tsx
  • MIGRATION.md
🧬 Code graph analysis (3)
code/core/src/components/components/tooltip/TooltipMessage.stories.tsx (2)
code/core/src/components/components/Popover/PopoverProvider.tsx (1)
  • PopoverProvider (64-129)
code/core/src/components/index.ts (1)
  • PopoverProvider (71-71)
code/core/src/manager/container/Menu.stories.tsx (2)
code/core/src/components/components/Popover/PopoverProvider.tsx (1)
  • PopoverProvider (64-129)
code/core/src/components/index.ts (1)
  • PopoverProvider (71-71)
code/core/src/components/components/Popover/PopoverProvider.tsx (1)
code/core/src/node-logger/index.ts (1)
  • deprecate (95-95)
🔇 Additional comments (15)
code/addons/docs/src/blocks/controls/Color.tsx (1)

396-396: LGTM! Accessibility improvement is appropriate.

The ariaLabel="Color picker" provides a clear, descriptive label for screen readers when the popover dialog opens.

code/core/src/manager/components/sidebar/ContextMenu.tsx (1)

199-199: LGTM! Accessibility improvement is appropriate.

The ariaLabel="Story actions" provides a clear, descriptive label that accurately describes the context menu's purpose for screen readers.

code/core/src/components/components/Tabs/Tabs.hooks.tsx (1)

72-72: LGTM! Accessibility improvement is appropriate.

The ariaLabel="More tabs" provides a clear, descriptive label for the overflow tabs menu, making it accessible to screen readers.

code/core/src/components/components/tooltip/TooltipMessage.stories.tsx (1)

30-30: LGTM! Accessibility improvement is appropriate.

The ariaLabel="Tooltip message" provides an appropriate label for the story demonstration, ensuring examples follow accessibility best practices.

code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx (1)

206-206: LGTM! Accessibility improvement is appropriate.

The ariaLabel="Argument value details" provides a clear, descriptive label that accurately describes the expanded argument information shown in the popover.

code/core/src/manager/container/Menu.stories.tsx (1)

24-24: LGTM! Accessibility label added.

The ariaLabel="Menu" provides an appropriate accessible name for the popover, improving screen reader support.

code/core/src/manager/components/sidebar/RefIndicator.tsx (1)

157-158: LGTM! Accessibility label added.

The ariaLabel="Storybook status" accurately describes the popover's content, which displays various status messages for composed Storybooks.

code/core/src/manager/components/sidebar/ChecklistWidget.tsx (1)

257-258: LGTM! Accessibility label added.

The ariaLabel="Checklist options" appropriately describes the popover menu containing checklist management actions.

code/core/src/manager/components/sidebar/Menu.tsx (1)

201-202: LGTM! Accessibility label added.

The ariaLabel="Storybook menu" provides an appropriate accessible name for the main menu popover.

code/core/src/manager/components/sidebar/RefBlocks.tsx (1)

129-130: LGTM! Accessibility label added.

The ariaLabel="Error details" appropriately describes the popover displaying formatted error information.

code/core/src/manager/components/preview/tools/share.tsx (1)

136-136: LGTM! Clear and descriptive accessibility label.

The ariaLabel="Share this story" provides an appropriate accessible name for the popover dialog, clearly describing its purpose to screen reader users.

code/core/src/components/components/Popover/PopoverProvider.stories.tsx (1)

31-31: LGTM! Good documentation practice.

Including ariaLabel in the story args ensures the new accessibility prop is documented and demonstrated in Storybook's own UI.

code/core/src/components/components/Popover/PopoverProvider.tsx (3)

15-19: LGTM! Well-documented new prop.

The ariaLabel prop is properly typed as optional with clear JSDoc documentation explaining its purpose and future requirement in Storybook 11.


79-83: LGTM! Deprecation warning correctly implemented.

The deprecation warning appropriately notifies users that ariaLabel will become mandatory in Storybook 11, providing clear guidance without breaking existing code.


112-117: LGTM! Aria-label correctly forwarded to popover.

The aria-label={ariaLabel} on PopoverUpstream properly labels the dialog for screen readers, and the existing placement, offset, and style props are preserved.

Copy link
Copy Markdown
Member

@Sidnioulz Sidnioulz left a comment

Choose a reason for hiding this comment

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

LGTM overall, only minor edits needed. Thanks for giving this a go, @gayanMatch! Please re-request a review once you've addressed the comments!

Comment thread code/addons/docs/src/blocks/components/ArgsTable/ArgValue.tsx Outdated
Comment thread code/core/src/components/components/Popover/PopoverProvider.tsx
Comment thread code/core/src/components/components/Tabs/Tabs.hooks.tsx Outdated
Comment thread code/core/src/manager/components/sidebar/ChecklistWidget.tsx Outdated
Comment thread code/core/src/manager/components/sidebar/ChecklistWidget.tsx Outdated
Comment thread code/core/src/manager/components/sidebar/ContextMenu.tsx Outdated
Comment thread code/core/src/manager/components/sidebar/RefIndicator.tsx Outdated
Comment thread MIGRATION.md Outdated
@Sidnioulz Sidnioulz changed the title feat: added aria-label to popver and aria-haspop to dialog A11y: Ensure popover dialogs have an ARIA label Jan 14, 2026
@Sidnioulz Sidnioulz added accessibility a11y: aria Accessibility issues related to ARIA markup usage labels Jan 14, 2026
Comment thread MIGRATION.md Outdated
@storybook-app-bot
Copy link
Copy Markdown

storybook-app-bot Bot commented Jan 16, 2026

Package Benchmarks

Commit: 0372b09, ran on 19 February 2026 at 14:47:47 UTC

No significant changes detected, all good. 👏

@gayanMatch gayanMatch force-pushed the fix/A11y-Ensure-all-popovers-have-a-dialog-role-and-an-aria-label branch from ad7a06d to 7161f8d Compare January 16, 2026 17:46
@github-actions github-actions Bot added the Stale label Jan 28, 2026
@Sidnioulz Sidnioulz force-pushed the fix/A11y-Ensure-all-popovers-have-a-dialog-role-and-an-aria-label branch from da468b5 to 5d51ca0 Compare February 19, 2026 13:36
Copy link
Copy Markdown
Member

@Sidnioulz Sidnioulz left a comment

Choose a reason for hiding this comment

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

Thanks @gayanMatch 🙇

Comment thread MIGRATION.md Outdated
@Sidnioulz Sidnioulz merged commit c01a360 into storybookjs:next Feb 19, 2026
114 checks passed
@github-actions github-actions Bot mentioned this pull request Feb 19, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y: aria Accessibility issues related to ARIA markup usage accessibility bug ci:normal Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[A11y]: Ensure all popovers have a dialog role and an aria-label

2 participants