Skip to content

Controls: Improve the accessibility of the object control #31581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 25, 2025
Merged

Conversation

Sidnioulz
Copy link
Member

@Sidnioulz Sidnioulz commented May 27, 2025

Improves #24150 but does not close it. The PR improves accessibility. Before the PR, it was impossible to edit JSON controls with the keyboard. Now, it's very difficult but no longer impossible.

This branch is a rebase of #24580 that has suffered significant drift. Note that I am not the original PR author and the original PR had been approved by @JReinhold. I'm opening this new PR to provide a clean CI status and to free up @fscgustavo who wrote the original PR.

I'll edit the original issue with additional steps to bring it to completion.

Caution

I recommend squashing this PR, the commit history misuses semantic commits and could lead future maintainers to think these commits aren't supposed to make user-facing changes.

Greptile Summary

Improves keyboard accessibility for JSON controls in Storybook by introducing a new accessible accordion component and enhancing keyboard navigation patterns.

  • Added new JsonNodeAccordion.tsx with proper ARIA attributes and keyboard support for JSON tree editing
  • Removed global document event listeners in JsonNodes.tsx in favor of component-level keyboard handlers
  • Added ARIA labels and improved focus states in Object.tsx for better screen reader support
  • Simplified component structure and improved tab order by reordering interactive elements
  • Removed editButtonElement prop from JsonTree component as part of accessibility improvements

@Sidnioulz Sidnioulz requested review from ghengeveld and JReinhold May 27, 2025 12:38
@Sidnioulz Sidnioulz changed the title Issue 24580 Controls: Improve the accessibility of the object control May 27, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

nx-cloud bot commented May 27, 2025

View your CI Pipeline Execution ↗ for commit b82f413.

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

☁️ Nx Cloud last updated this comment at 2025-06-25 11:30:09 UTC

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Jun 23, 2025

Package Benchmarks

Commit: b82f413, ran on 23 June 2025 at 10:26:43 UTC

The following packages have significant changes to their size or dependencies:

storybook

Before After Difference
Dependency count 49 49 0
Self size 31.87 MB 31.85 MB 🎉 -16 KB 🎉
Dependency size 17.41 MB 17.41 MB 0 B
Bundle Size Analyzer Link Link

sb

Before After Difference
Dependency count 50 50 0
Self size 1 KB 1 KB 🎉 -20 B 🎉
Dependency size 49.27 MB 49.26 MB 🎉 -16 KB 🎉
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 216 216 0
Self size 582 KB 582 KB 🎉 -20 B 🎉
Dependency size 95.13 MB 95.12 MB 🎉 -16 KB 🎉
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 185 185 0
Self size 31 KB 31 KB 0 B
Dependency size 79.26 MB 79.25 MB 🎉 -16 KB 🎉
Bundle Size Analyzer Link Link

@ghengeveld ghengeveld moved this to Empathy Queue (prioritized) in Core Team Projects Jun 23, 2025
@ghengeveld ghengeveld merged commit cd6d5b7 into next Jun 25, 2025
57 of 58 checks passed
@ghengeveld ghengeveld deleted the issue-24580 branch June 25, 2025 14:53
@github-project-automation github-project-automation bot moved this from Empathy Queue (prioritized) to Done in Core Team Projects Jun 25, 2025
@github-actions github-actions bot mentioned this pull request Jun 25, 2025
71 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants