Skip to content
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

fixes a11y issue in Compacta storybook #436

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"check-types": "turbo run check-types --filter=./packages/* --no-daemon",
"dev": "turbo run dev --parallel --no-daemon",
"format": "prettier --check \"**/{.vscode/*,*.ts,*.tsx,*.js,*.json,*.md}\"",
"format:fix": "prettier --write \"**/{.vscode/*,*.ts,*.tsx,*.js,*.json,*.md,*.mdoc}\"",
"format:fix": "prettier --write \"**/{.vscode/*,*.ts,*.tsx,*.js,*.json,*.md}\"",
"lint": "turbo run lint --no-daemon",
"lint:fix": "turbo run lint:fix --no-daemon",
"new:package": "node ./helpers/create-package/index.js",
Expand Down
12 changes: 9 additions & 3 deletions packages/ui/src/components/compacta/compacta.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ export const Default = () => {
<Form>
<Form.Group>
<Form.Label htmlFor={`primary-${id}`}>Primary</Form.Label>
<Form.Hint>Primary title text</Form.Hint>
<Form.Hint id={`primary-hint-${id}`}>Primary title text</Form.Hint>
<Input
aria-describedby={`primary-hint-${id}`}
name={`primary-${id}`}
id={`primary-${id}`}
value={inputs[`primary-${id}` as keyof typeof inputs] || ''}
onChange={e => {
handleChange(e);
Expand All @@ -42,9 +44,11 @@ export const Default = () => {
</Form.Group>
<Form.Group>
<Form.Label htmlFor={`secondary-${id}`}>Secondary</Form.Label>
<Form.Hint>Secondary title text</Form.Hint>
<Form.Hint id={`secondary-hint-${id}`}>Secondary title text</Form.Hint>
<Input
aria-describedby={`secondary-hint-${id}`}
name={`secondary-${id}`}
id={`secondary-${id}`}
value={inputs[`secondary-${id}` as keyof typeof inputs] || ''}
onChange={e => {
handleChange(e);
Expand All @@ -54,9 +58,11 @@ export const Default = () => {
</Form.Group>
<Form.Group>
<Form.Label htmlFor={`tertiary-${id}`}>Tertiary</Form.Label>
<Form.Hint>Tertiary title text</Form.Hint>
<Form.Hint id={`tertiary-hint-${id}`}>Tertiary title text</Form.Hint>
<Input
aria-describedby={`tertiary-hint-${id}`}
name={`tertiary-${id}`}
id={`tertiary-${id}`}
value={inputs[`tertiary-${id}` as keyof typeof inputs] || ''}
onChange={e => {
handleChange(e);
Expand Down