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

Commit 1e37eb9

Browse files
Merge branch 'develop' into improve-types
2 parents b9eb1bf + 464a0ad commit 1e37eb9

File tree

9 files changed

+230
-15
lines changed

9 files changed

+230
-15
lines changed

.changeset/large-bananas-allow.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@chakra-ui/vue': minor
3+
'@chakra-ui/nuxt': minor
4+
'@chakra-ui/theme-vue': minor
5+
'chakra-ui-docs': minor
6+
---
7+
8+
Backport v1 Theme API to v0.x

config/.env.defaults

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
BASE_URL=http://localhost:3000
2-
MIXPANEL_TOKEN=91ec73fd1b8e164d6cfbae6bf1a3e7d1

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"mdx-vue": "^1.0.2",
8686
"mdx-vue-loader": "^1.0.2",
8787
"node-fetch": "^2.6.0",
88-
"node-sass": "^4.13.1",
88+
"node-sass": "^6.0.1",
8989
"nuxt": "2.14.6",
9090
"portal-vue": "^2.1.6",
9191
"prismjs": "^1.19.0",

packages/chakra-ui-core/src/CButtonGroup/CButtonGroup.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* @see Docs https://vue.chakra-ui.com/button
88
* @see Source https://github.com/chakra-ui/chakra-ui-vue/blob/master/packages/chakra-ui-core/src/CButtonGroup/CButtonGroup.js
9-
* @see A11y https://github.com/chakra-ui/chakra-ui-vue/blob/master/packages/chakra-ui-core/src/CButton/accessibility.md
9+
* @see A11y https://github.com/chakra-ui/chakra-ui-vue/blob/master/packages/chakra-ui-core/src/CButtonGroup/accessibility.md
1010
* @see WAI-ARIA https://www.w3.org/TR/wai-aria-practices-1.2/#button
1111
*/
1212

@@ -73,6 +73,7 @@ const CButtonGroup = {
7373
attrs: {
7474
d: 'inline-block',
7575
...data.attrs,
76+
role: 'group',
7677
'data-chakra-component': 'CButtonGroup'
7778
},
7879
on: listeners
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ButtonGroup | Accessibility ♿️
2+
3+
This report is adapted to list the [WAI-ARIA Authoring practices for buttons](https://www.w3.org/TR/wai-aria-practices-1.2/#button) supported by Chakra UI for the `CButtonGroup` component.
4+
5+
### Description
6+
The `CButtonGroup` component provides a wrapping container with `role="group"` for multiple children button elements.
7+
8+
#### Components
9+
`@chakra-ui/vue` exports 1 ButtonGroup related components:
10+
- `CButtonGroup`
11+
12+
13+
### `CButton` WAI-ARIA Roles, States, and Properties:
14+
- The `CButtonGroup` component contains the `role="group"` for a group of child `CButton` components grouped together.
15+
16+
Noticed a bug or inconsistency with this component? [Open an issue](https://github.com/chakra-ui/chakra-ui-vue/issues/new/choose)

packages/chakra-ui-core/src/CButtonGroup/tests/__snapshots__/CButtonGroup.test.js.snap

+2
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ exports[`should attach buttons when \`is-attached\` is passed 1`] = `
144144
<div
145145
class="emotion-0"
146146
data-chakra-component="CButtonGroup"
147+
role="group"
147148
>
148149
<button
149150
class="emotion-1"
@@ -305,6 +306,7 @@ exports[`should render correctly 1`] = `
305306
<div
306307
class="emotion-0"
307308
data-chakra-component="CButtonGroup"
309+
role="group"
308310
>
309311
<button
310312
class="emotion-1"

packages/chakra-ui-core/src/CCheckbox/accessibility.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Chakra UI supports two types of checkbox widgets:
88
- **Tri-state (Indeterminate)**: This type of checkbox supports an additional third state known as partially checked.
99

1010
#### Components
11-
`@chakra-ui/vue` exports 1 checkbox related components:
11+
`@chakra-ui/vue` exports 2 checkbox related components:
1212
- `CCheckbox`
13+
- `CCheckboxGroup`
1314

1415
### `CCheckbox` Keyboard Interaction
1516
- [x] **`Space`**: When the checkbox has focus, pressing the Space key changes the state of the checkbox.
@@ -20,5 +21,24 @@ Native HTML checkboxes are 100% accessible by default, so we use a `CControlBox`
2021

2122
The `CCheckbox` component composes `CControlBox`, a component we created to make it easy to style an element based on sibling inputs.
2223

24+
### `CCheckboxGroup` WAI-ARIA compliance
25+
- The `CCheckboxGroup` by default adds the `role="group"` attribute to itself.
26+
27+
> This should be implemented by the user
28+
- The `CCheckboxGroup` accessibility can be improved by adding an `aria-label` attribute.
29+
30+
```html
31+
<c-checkbox-group aria-label="Sandwich Vegetables">
32+
<c-checkbox size="sm" variant-color="red" default-is-checked>
33+
Lettuce
34+
</c-checkbox>
35+
<c-checkbox size="md" variant-color="green" default-is-checked>
36+
Tomato
37+
</c-checkbox>
38+
<c-checkbox size="lg" variant-color="pink" default-is-checked>
39+
Sprouts
40+
</c-checkbox>
41+
</c-checkbox-group>
42+
```
2343

2444
Noticed a bug or inconsistency with this component? [Open an issue](https://github.com/chakra-ui/chakra-ui-vue/issues/new/choose)

website/now.json

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
{
2-
"version": 2,
3-
"env": {
4-
"MIXPANEL_TOKEN": "91ec73fd1b8e164d6cfbae6bf1a3e7d1"
5-
},
6-
"build": {
7-
"env": {
8-
"MIXPANEL_TOKEN": "91ec73fd1b8e164d6cfbae6bf1a3e7d1"
9-
}
10-
}
2+
"version": 2
113
}
124

0 commit comments

Comments
 (0)