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

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

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 5eac305.

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

☁️ Nx Cloud last updated this comment at 2025-05-28 07:18:15 UTC

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

Successfully merging this pull request may close these issues.

3 participants