Conversation
Fixes screen reader announcing incorrect selected state on non-selected tabs. Added aria-selected and tabIndex attributes to TabButton components to properly communicate tab state to assistive technologies like Windows Narrator. Fixes #32654
fix(a11y): add aria-selected attribute to tab buttons
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
…r/code-snippets # Conflicts: # code/core/src/core-server/dev-server.ts
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
code/core/src/core-server/build-static.ts (1)
168-188: Investigate the type cast necessity.The type cast on line 176 uses the
as unknown aspattern to bypass type checking when passingindexGeneratorto the manifest generator. This suggests a type incompatibility between the localStoryIndexGeneratorclass and the type expected byComponentManifestGenerator.While this works, it's a code smell that may indicate:
- Duplicate or divergent
StoryIndexGeneratortype definitions- The generator interface should accept a more general type
- A structural issue in the type system
Consider unifying the types or adjusting the
ComponentManifestGeneratorsignature to avoid the double-cast.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
code/core/src/core-server/build-static.ts(3 hunks)code/core/src/core-server/presets/favicon.test.ts(2 hunks)code/renderers/react/package.json(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- code/renderers/react/package.json
- code/core/src/core-server/presets/favicon.test.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,jsx,json,html,ts,tsx,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{js,jsx,json,html,ts,tsx,mjs}: Run Prettier formatting on changed files before committing
Run ESLint on changed files and fix all errors/warnings before committing (useyarn lint:js:cmd <file>)
Files:
code/core/src/core-server/build-static.ts
**/*.{ts,tsx,js,jsx,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Export functions from modules when they need to be unit-tested
Files:
code/core/src/core-server/build-static.ts
code/**/*.{ts,tsx,js,jsx,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
In application code, use Storybook loggers instead of
console.*(client code:storybook/internal/client-logger; server code:storybook/internal/node-logger)
Files:
code/core/src/core-server/build-static.ts
{code/**,scripts/**}/**/*.{ts,tsx,js,jsx,mjs}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Do not use
console.log,console.warn, orconsole.errordirectly unless in isolated files where importing loggers would significantly increase bundle size
Files:
code/core/src/core-server/build-static.ts
🧠 Learnings (3)
📚 Learning: 2025-10-13T13:33:14.659Z
Learnt from: CR
PR: storybookjs/storybook#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-13T13:33:14.659Z
Learning: Applies to scripts/**/*.{ts,js,mjs} : In Node.js scripts, use `storybook/internal/node-logger` instead of `console.*`
Applied to files:
code/core/src/core-server/build-static.ts
📚 Learning: 2025-10-13T13:33:14.659Z
Learnt from: CR
PR: storybookjs/storybook#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-13T13:33:14.659Z
Learning: Applies to code/**/*.{ts,tsx,js,jsx,mjs} : In application code, use Storybook loggers instead of `console.*` (client code: `storybook/internal/client-logger`; server code: `storybook/internal/node-logger`)
Applied to files:
code/core/src/core-server/build-static.ts
📚 Learning: 2025-10-13T13:33:14.659Z
Learnt from: CR
PR: storybookjs/storybook#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-13T13:33:14.659Z
Learning: Applies to test-storybooks/** : Maintain test Storybook configurations under `test-storybooks/` for E2E and visual testing scenarios
Applied to files:
code/core/src/core-server/build-static.ts
🧬 Code graph analysis (1)
code/core/src/core-server/build-static.ts (3)
code/renderers/react/src/componentManifest/generator.ts (1)
componentManifestGenerator(20-135)code/renderers/react/src/preset.ts (1)
componentManifestGenerator(11-11)code/core/src/types/modules/core-common.ts (1)
ComponentManifestGenerator(365-367)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: merged
- GitHub Check: Publish canary version
- GitHub Check: Core Unit Tests, windows-latest
🔇 Additional comments (2)
code/core/src/core-server/build-static.ts (2)
1-1: LGTM! Imports support the new manifest generation feature.The added imports (
mkdir,writeFile, andComponentManifestGeneratortype) are appropriately used in the experimental component manifest generation code.Also applies to: 14-14
174-186: Good error handling for experimental feature.The try-catch appropriately logs errors without failing the build, which is suitable for an experimental feature. The use of
logger.error()correctly follows the coding guidelines for server-side code.Based on learnings
Feature branch for any 10.1 development.
Will be merged when 10.0 has been released and thus frees up the
nextbranch.🦋 Canary release
This pull request has been released as version
0.0.0-pr-32810-sha-caef1f25. Try it out in a new sandbox by runningnpx storybook@0.0.0-pr-32810-sha-caef1f25 sandboxor in an existing project withnpx storybook@0.0.0-pr-32810-sha-caef1f25 upgrade.More information
0.0.0-pr-32810-sha-caef1f2510.1-with-canary-releasecaef1f251761856434)To request a new release of this pull request, mention the
@storybookjs/coreteam.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=32810