@carbon/icon-helpers 10.69.0 → 10.71.0-rc.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.
- package/README.md +2 -2
- package/es/getAttributes.d.ts +1 -1
- package/es/index.js +2 -5
- package/lib/getAttributes.d.ts +1 -1
- package/lib/index.js +2 -5
- package/package.json +4 -4
- package/umd/getAttributes.d.ts +1 -1
- package/umd/index.js +2 -5
package/README.md
CHANGED
|
@@ -42,8 +42,8 @@ const attributes = getAttributes({ width: 20, height: 20 });
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
In order for the icon to be considered focusable, you will need to provide
|
|
45
|
-
either `aria-label
|
|
46
|
-
|
|
45
|
+
either `aria-label` or `aria-labelledby` in the given `attributes` in addition
|
|
46
|
+
to `tabindex`. For example:
|
|
47
47
|
|
|
48
48
|
```js
|
|
49
49
|
const { getAttributes } = require('@carbon/icon-helpers');
|
package/es/getAttributes.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -65,7 +65,7 @@ function _toPropertyKey(t) {
|
|
|
65
65
|
var _excluded = ["width", "height", "viewBox"],
|
|
66
66
|
_excluded2 = ["tabindex"];
|
|
67
67
|
/**
|
|
68
|
-
* Copyright IBM Corp. 2018,
|
|
68
|
+
* Copyright IBM Corp. 2018, 2026
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
71
71
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -98,10 +98,7 @@ function getAttributes() {
|
|
|
98
98
|
height: height,
|
|
99
99
|
viewBox: viewBox
|
|
100
100
|
});
|
|
101
|
-
|
|
102
|
-
// TODO: attributes.title assumes that the consumer will implement <title> and
|
|
103
|
-
// correctly set `aria-labelledby`.
|
|
104
|
-
if (iconAttributes['aria-label'] || iconAttributes['aria-labelledby'] || iconAttributes.title) {
|
|
101
|
+
if (iconAttributes['aria-label'] || iconAttributes['aria-labelledby']) {
|
|
105
102
|
iconAttributes.role = 'img';
|
|
106
103
|
|
|
107
104
|
// Reference:
|
package/lib/getAttributes.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -67,7 +67,7 @@ function _toPropertyKey(t) {
|
|
|
67
67
|
var _excluded = ["width", "height", "viewBox"],
|
|
68
68
|
_excluded2 = ["tabindex"];
|
|
69
69
|
/**
|
|
70
|
-
* Copyright IBM Corp. 2018,
|
|
70
|
+
* Copyright IBM Corp. 2018, 2026
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
73
73
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -100,10 +100,7 @@ function getAttributes() {
|
|
|
100
100
|
height: height,
|
|
101
101
|
viewBox: viewBox
|
|
102
102
|
});
|
|
103
|
-
|
|
104
|
-
// TODO: attributes.title assumes that the consumer will implement <title> and
|
|
105
|
-
// correctly set `aria-labelledby`.
|
|
106
|
-
if (iconAttributes['aria-label'] || iconAttributes['aria-labelledby'] || iconAttributes.title) {
|
|
103
|
+
if (iconAttributes['aria-label'] || iconAttributes['aria-labelledby']) {
|
|
107
104
|
iconAttributes.role = 'img';
|
|
108
105
|
|
|
109
106
|
// Reference:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/icon-helpers",
|
|
3
3
|
"description": "Helpers used alongside icons for digital and software products using the Carbon Design System",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.71.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"postinstall": "ibmtelemetry --config=telemetry.yml"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@carbon/cli": "^11.
|
|
40
|
+
"@carbon/cli": "^11.39.0-rc.0",
|
|
41
41
|
"rimraf": "^6.0.1",
|
|
42
|
-
"typescript-config-carbon": "^0.
|
|
42
|
+
"typescript-config-carbon": "^0.9.0"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@ibm/telemetry-js": "^1.5.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "cbde6bd5df4774c2780411b3faa02ec3a0bb7585"
|
|
49
49
|
}
|
package/umd/getAttributes.d.ts
CHANGED
package/umd/index.js
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
var _excluded = ["width", "height", "viewBox"],
|
|
72
72
|
_excluded2 = ["tabindex"];
|
|
73
73
|
/**
|
|
74
|
-
* Copyright IBM Corp. 2018,
|
|
74
|
+
* Copyright IBM Corp. 2018, 2026
|
|
75
75
|
*
|
|
76
76
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
77
77
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -104,10 +104,7 @@
|
|
|
104
104
|
height: height,
|
|
105
105
|
viewBox: viewBox
|
|
106
106
|
});
|
|
107
|
-
|
|
108
|
-
// TODO: attributes.title assumes that the consumer will implement <title> and
|
|
109
|
-
// correctly set `aria-labelledby`.
|
|
110
|
-
if (iconAttributes['aria-label'] || iconAttributes['aria-labelledby'] || iconAttributes.title) {
|
|
107
|
+
if (iconAttributes['aria-label'] || iconAttributes['aria-labelledby']) {
|
|
111
108
|
iconAttributes.role = 'img';
|
|
112
109
|
|
|
113
110
|
// Reference:
|