Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 2a9be0f

Browse files
authored
Merge pull request #153 from smooth-code/fix-a11y
Fix a11y
2 parents e723258 + 03d4d94 commit 2a9be0f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

packages/shared/core/Button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const Button = createComponent({
6262
background-color: ${baseColor};
6363
6464
&:focus {
65-
${p.theme.mixins.baseFocus(baseColor)(p)};
65+
${p.theme.mixins.controlFocus(baseColor)(p)};
6666
}
6767
6868
&:not(:disabled):hover,

packages/shared/core/Form.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export function createFieldsGroupContext(type) {
101101
return {
102102
...props,
103103
id,
104-
'aria-describedby': props['aria-describedby'] || labelId,
105104
'aria-labelledby': props['aria-labelledby'] || labelId,
106105
}
107106
}

website/src/pages/docs/form.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Props } from '../../components/Props'
1818

1919
## Basic
2020

21-
`Form`, `FormField`, `FormFieldLabel`, `FormCheck`, `FormCheckLabel` are the foundations of form layout. Components are smart and automatically link labels to form controls if a name is provided. A unique `id` is automatically generated, `htmlFor` is added to `label` and `aria-labelledby` / `aria-describedby` attributes are added to controls.
21+
`Form`, `FormField`, `FormFieldLabel`, `FormCheck`, `FormCheckLabel` are the foundations of form layout. Components are smart and automatically link labels to form controls if a name is provided. A unique `id` is automatically generated, `htmlFor` is added to `label` and `aria-labelledby` attributes are added to controls.
2222

2323
```jsx live noInline
2424
import React from 'react'
@@ -372,7 +372,7 @@ render(<Example />)
372372
All forms components follow [WAI-ARIA Pattern](https://www.w3.org/TR/wai-aria-1.1/) to ensure a complete accesibility of your forms.
373373

374374
- Role `form` is automatically added to `form` if not a native `form` element
375-
- `aria-describedby` and `aria-labelledby` are automatically added to `label` when a name is provided
375+
- `aria-labelledby` is automatically added to `label` when a name is provided
376376

377377
## API
378378

0 commit comments

Comments
 (0)