@khanacademy/wonder-blocks-icon-button 11.5.1 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @khanacademy/wonder-blocks-icon-button@
|
|
2
|
+
> @khanacademy/wonder-blocks-icon-button@12.0.0 build:css /home/runner/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon-button
|
|
3
3
|
> pnpm exec wonder-blocks-tokens .
|
|
4
4
|
|
|
5
5
|
CSS variables generated successfully in: /home/runner/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon-button/dist/css
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-icon-button
|
|
2
2
|
|
|
3
|
+
## 12.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 849def2: `IconButton` now requires an `aria-label` prop. Since an `IconButton` only renders an icon with no visible text, an accessible name is needed for it to be announced correctly by assistive technology. Making `aria-label` required at the type level prevents call sites from accidentally shipping unlabeled buttons. All existing call sites must be updated to pass an `aria-label`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [8ac496e]
|
|
12
|
+
- @khanacademy/wonder-blocks-clickable@8.3.0
|
|
13
|
+
- @khanacademy/wonder-blocks-styles@0.3.0
|
|
14
|
+
|
|
3
15
|
## 11.5.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { IconButtonProps, IconButtonRef } from "../util/icon-button.types";
|
|
3
|
-
type Props = Omit<IconButtonProps, "icon"> & {
|
|
3
|
+
type Props = Omit<IconButtonProps, "icon" | "aria-label"> & {
|
|
4
|
+
/**
|
|
5
|
+
* The alternative text for the icon button.
|
|
6
|
+
*
|
|
7
|
+
* Optional at this internal level because higher-level components may label
|
|
8
|
+
* the button in different ways (e.g. `ActivityIconButton` can use a visible
|
|
9
|
+
* `label` instead of `aria-label`). The public icon button components are
|
|
10
|
+
* responsible for enforcing their own labeling requirements.
|
|
11
|
+
*/
|
|
12
|
+
"aria-label"?: string;
|
|
4
13
|
/**
|
|
5
14
|
* The button content.
|
|
6
15
|
*/
|
|
@@ -114,6 +114,13 @@ export type BaseIconButtonProps = Partial<Omit<AriaProps, "aria-disabled">> & {
|
|
|
114
114
|
onKeyUp?: (e: React.KeyboardEvent) => unknown;
|
|
115
115
|
};
|
|
116
116
|
export type IconButtonProps = BaseIconButtonProps & {
|
|
117
|
+
/**
|
|
118
|
+
* The alternative text for the icon button. This is required for
|
|
119
|
+
* accessibility because the button only contains an icon and has no visible
|
|
120
|
+
* text label. It is used to announce the button's purpose to users of
|
|
121
|
+
* assistive technology such as screen readers.
|
|
122
|
+
*/
|
|
123
|
+
"aria-label": string;
|
|
117
124
|
/**
|
|
118
125
|
* The action type/category of the icon button.
|
|
119
126
|
*
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "12.0.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"./styles.css": "./dist/css/vars.css"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@khanacademy/wonder-blocks-clickable": "8.
|
|
31
|
+
"@khanacademy/wonder-blocks-clickable": "8.3.0",
|
|
32
32
|
"@khanacademy/wonder-blocks-core": "12.5.0",
|
|
33
33
|
"@khanacademy/wonder-blocks-icon": "6.0.2",
|
|
34
|
-
"@khanacademy/wonder-blocks-styles": "0.
|
|
34
|
+
"@khanacademy/wonder-blocks-styles": "0.3.0",
|
|
35
35
|
"@khanacademy/wonder-blocks-theming": "4.1.0",
|
|
36
36
|
"@khanacademy/wonder-blocks-tokens": "18.0.0",
|
|
37
37
|
"@khanacademy/wonder-blocks-typography": "5.0.5"
|