-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Addon-Docs: Improve object control JSON editor accessibility #34108
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
anchmelev
wants to merge
25
commits into
storybookjs:next
Choose a base branch
from
anchmelev:fix/issue-24150-object-control-json-a11y
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c4ed70a
fix(core): improve interactions panel accessibility
anchmelev d975247
fix(core): address interactions panel review
anchmelev 6a996c2
fix(addon-docs): improve object control JSON editor accessibility
anchmelev 621d6dd
fix(addon-docs): clear stale JSON parse errors in object control
anchmelev 4844c65
test(addon-docs): move object control accessibility checks to stories
anchmelev 0e1c17b
test(addon-docs): use switch role in object control stories
anchmelev 49fba35
test(addon-docs): fix object control json editor interactions
anchmelev 165dc74
fix(addon-docs): stabilize object control json editor a11y
anchmelev 04cd2c4
refactor(addon-docs): simplify object control JSON editor interaction…
anchmelev 3890b50
fix(addon-docs): preserve aria descriptions with tooltips
anchmelev 7a66298
fix(addon-docs): improve object control error contrast
anchmelev b90f667
refactor(addon-docs): enhance object control JSON editor with layout …
anchmelev b45f4ef
refactor(addon-docs): adjust styling for object control JSON editor i…
anchmelev 7409598
Merge branch 'next' into fix/issue-24150-object-control-json-a11y
anchmelev dc0cde3
Merge remote-tracking branch 'origin/next' into fix/issue-24150-objec…
anchmelev 0a5e07c
Merge branch 'next' of https://github.com/storybookjs/storybook into …
anchmelev f65ea61
fix(docs): handle function values in object control
anchmelev f453baf
fix: restore green checks for object control branch
anchmelev f7b52b6
Merge branch 'next' of https://github.com/storybookjs/storybook into …
anchmelev afbdb47
Update Object control live announcement
Sidnioulz 1ef15e2
Merge branch 'next' into fix/issue-24150-object-control-json-a11y
Sidnioulz d27df73
Add toHaveLiveRegion to Object stories and fix its types
Sidnioulz 6a26397
Add new AllControlsObjectSet and AllControlsFilled stories with inter…
anchmelev ce61c5c
test: target object control by stable id
anchmelev 28f018c
fix: restore object control raw editor spacing
anchmelev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // @vitest-environment happy-dom | ||
| import React from 'react'; | ||
|
|
||
| import { render, screen } from '@testing-library/react'; | ||
| import { describe, expect, it, vi } from 'vitest'; | ||
| import { ThemeProvider, convert, themes } from 'storybook/theming'; | ||
|
|
||
| import { ObjectControl } from './Object'; | ||
|
|
||
| describe('Object control', () => { | ||
| it('renders function values without crashing', () => { | ||
| const onChange = vi.fn(); | ||
|
|
||
| render( | ||
| <ThemeProvider theme={convert(themes.light)}> | ||
| <ObjectControl | ||
| name="object" | ||
| storyId="story--function" | ||
| value={vi.fn()} | ||
| onChange={onChange} | ||
| /> | ||
| </ThemeProvider> | ||
| ); | ||
|
|
||
| const rawInput = screen.getByRole('textbox', { name: 'Edit object as JSON' }); | ||
|
|
||
| expect((rawInput as HTMLTextAreaElement).value).toBe(''); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why this changed? This shouldn't have happened on that PR.