@carbon/icon-helpers 10.70.0 → 10.71.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 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`, `aria-labelledby`, or `title` in the given `attributes` in
46
- addition to `tabindex`. For example:
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');
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2018, 2024
2
+ * Copyright IBM Corp. 2018, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
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, 2024
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:
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2018, 2024
2
+ * Copyright IBM Corp. 2018, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
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, 2024
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.70.0",
4
+ "version": "10.71.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "postinstall": "ibmtelemetry --config=telemetry.yml"
38
38
  },
39
39
  "devDependencies": {
40
- "@carbon/cli": "^11.38.0",
40
+ "@carbon/cli": "^11.39.0",
41
41
  "rimraf": "^6.0.1",
42
42
  "typescript-config-carbon": "^0.9.0"
43
43
  },
@@ -45,5 +45,5 @@
45
45
  "dependencies": {
46
46
  "@ibm/telemetry-js": "^1.5.0"
47
47
  },
48
- "gitHead": "57fdbc7bfad9349b5c4359c7d621e709cd4daa25"
48
+ "gitHead": "f366448449df3d81c9bb63a8a842772d734c163a"
49
49
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2018, 2024
2
+ * Copyright IBM Corp. 2018, 2026
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
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, 2024
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: