Skip to content

Docs: Fix A11y preview configuration example (main branch)#32766

Merged
jonniebigodes merged 1 commit into
mainfrom
docs_fix_project_level_a11y_example_on_main
Oct 20, 2025
Merged

Docs: Fix A11y preview configuration example (main branch)#32766
jonniebigodes merged 1 commit into
mainfrom
docs_fix_project_level_a11y_example_on_main

Conversation

@jonniebigodes
Copy link
Copy Markdown
Contributor

@jonniebigodes jonniebigodes commented Oct 18, 2025

Closes #32731

What I did

This pull request targets the main branch to get the documentation published and available as soon as possible, and to avoid misconceptions when a user attempts to disable A11y tests at the project-level.

This PR was separate to avoid backporting CSF's next snippets into this version of the documentation.

What was done:

  • Adjusted the A11y project-level configuration snippet to the correct API (i.e., replacing globals with initialGlobals)

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

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

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.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Documentation
    • Updated preview configuration documentation to reflect the renaming of a configuration property. Users should update their configuration settings accordingly to use the new property name.

@jonniebigodes jonniebigodes self-assigned this Oct 18, 2025
@jonniebigodes jonniebigodes added documentation ci:docs Run the CI jobs for documentation checks only. labels Oct 18, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 18, 2025

📝 Walkthrough

Walkthrough

Documentation snippet updated to rename the globals configuration key to initialGlobals in JavaScript and TypeScript code examples for the accessibility addon preview configuration.

Changes

Cohort / File(s) Change Summary
Configuration key rename
docs/_snippets/addon-a11y-config-in-preview.md
Updated code examples in both JavaScript and TypeScript blocks to rename the exported preview configuration property from globals to initialGlobals

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs_fix_project_level_a11y_example_on_main

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93328ce and c5ac3f5.

📒 Files selected for processing (1)
  • docs/_snippets/addon-a11y-config-in-preview.md (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**

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

Update documentation under docs/ for significant changes, including migration guides for breaking changes

Files:

  • docs/_snippets/addon-a11y-config-in-preview.md
⏰ 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). (2)
  • GitHub Check: Danger JS
  • GitHub Check: Core Unit Tests, windows-latest
🔇 Additional comments (1)
docs/_snippets/addon-a11y-config-in-preview.md (1)

1-32: ✓ Documentation fix correctly updates the A11y configuration API.

Both the JavaScript and TypeScript examples properly replace the incorrect globals key with the correct initialGlobals key. This aligns with the Storybook Preview configuration API and resolves the type error reported in issue #32731. The configuration now correctly demonstrates how to enable manual accessibility checks at the project level via initialGlobals: { a11y: { manual: true } }.

The examples maintain clear documentation of the Axe parameters (context, config, options) and are consistent across both code snippets.

Also applies to: 34-70


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

@jonniebigodes jonniebigodes removed their assignment Oct 18, 2025
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Oct 18, 2025

View your CI Pipeline Execution ↗ for commit c5ac3f5

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 15s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-18 20:44:20 UTC

@jonniebigodes jonniebigodes merged commit 445988e into main Oct 20, 2025
12 of 14 checks passed
@jonniebigodes jonniebigodes deleted the docs_fix_project_level_a11y_example_on_main branch October 20, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:docs Run the CI jobs for documentation checks only. documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant