-
Notifications
You must be signed in to change notification settings - Fork 256
test(action-group): add unit, accessibility, and VRT coverage #6589
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
Changes from all commits
d9e2411
3e477a8
a82c2d1
e40e4c5
80d5522
5dcf4a4
e9ceb69
79daec7
5b8862a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compact action groups need to be able to modify the action button corner radii, this adds VRT testing for those |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -372,4 +372,32 @@ export const Justified: Story = { | |
| // ACCESSIBILITY STORIES | ||
| // ──────────────────────────────── | ||
|
|
||
| // Outer `role="toolbar"` landmark wrapping two named `role="group"` clusters, | ||
| // per the APG toolbar example and the migration plan's accessibility | ||
| // section. `swc-action-group` never sets `role="toolbar"` itself; that role | ||
| // belongs on this wrapper only, since the host role is fixed to `"group"` | ||
| // and not author-overridable. Backs the `ToolbarComposition` ARIA-snapshot | ||
| // assertion in `action-group.a11y.spec.ts`. | ||
| export const ToolbarComposition: Story = { | ||
| render: () => html` | ||
| <div | ||
| role="toolbar" | ||
| aria-label="Document actions" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use of |
||
| style="display: flex; gap: var(--swc-spacing-400);" | ||
| > | ||
| <swc-action-group accessible-label="Edit actions"> | ||
| <swc-action-button>Cut</swc-action-button> | ||
| <swc-action-button>Copy</swc-action-button> | ||
| <swc-action-button>Paste</swc-action-button> | ||
| </swc-action-group> | ||
| <swc-action-group accessible-label="View actions"> | ||
| <swc-action-button>Zoom in</swc-action-button> | ||
| <swc-action-button>Zoom out</swc-action-button> | ||
| </swc-action-group> | ||
| </div> | ||
| `, | ||
| tags: ['a11y'], | ||
| }; | ||
| ToolbarComposition.storyName = 'Toolbar wrapper composition'; | ||
|
|
||
| // TODO: will complete in separate documentation pass of phase 7 | ||
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.
@5t3ph I started looking at Chromatic and realized that while
<swc-action-button>isn't affected by applyinginline-size: 100%(for vertical action group alignment), the global action button is. I'm excluding this style, and I committed the changes to the global stylesheet. I'm not 100% that's how this is supposed to be handled though so would appreciate some eyes on this piece.