Skip to content

Commit

Permalink
fixes a11y issue in Compacta storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
samithaf committed Dec 4, 2023
1 parent abe1722 commit 2af6ac2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
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

0 comments on commit 2af6ac2

Please sign in to comment.