@y14e/disclosure-css 1.2.2 → 1.2.3

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/dist/index.cjs CHANGED
@@ -94,12 +94,11 @@ var Disclosure = class {
94
94
  #initialize() {
95
95
  this.#controller = new AbortController();
96
96
  const { signal } = this.#controller;
97
- this.#detailsElements.forEach((details, i) => {
98
- const summary = this.#summaryElements[i];
97
+ this.#summaryElements.forEach((summary) => {
99
98
  if (!summary) {
100
99
  return;
101
100
  }
102
- if (!isFocusable(details)) {
101
+ if (!isFocusable(summary)) {
103
102
  summary.setAttribute("aria-disabled", "true");
104
103
  summary.setAttribute("tabindex", "-1");
105
104
  summary.style.setProperty("pointer-events", "none");
@@ -162,7 +161,7 @@ function isFocusable(element) {
162
161
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
163
162
  * Using the <details> and <summary> element.
164
163
  *
165
- * @version 1.2.2
164
+ * @version 1.2.3
166
165
  * @author Yusuke Kamiyamane
167
166
  * @license MIT
168
167
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.2.2
6
+ * @version 1.2.3
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
4
4
  * Using the <details> and <summary> element.
5
5
  *
6
- * @version 1.2.2
6
+ * @version 1.2.3
7
7
  * @author Yusuke Kamiyamane
8
8
  * @license MIT
9
9
  * @copyright Copyright (c) Yusuke Kamiyamane
package/dist/index.js CHANGED
@@ -92,12 +92,11 @@ var Disclosure = class {
92
92
  #initialize() {
93
93
  this.#controller = new AbortController();
94
94
  const { signal } = this.#controller;
95
- this.#detailsElements.forEach((details, i) => {
96
- const summary = this.#summaryElements[i];
95
+ this.#summaryElements.forEach((summary) => {
97
96
  if (!summary) {
98
97
  return;
99
98
  }
100
- if (!isFocusable(details)) {
99
+ if (!isFocusable(summary)) {
101
100
  summary.setAttribute("aria-disabled", "true");
102
101
  summary.setAttribute("tabindex", "-1");
103
102
  summary.style.setProperty("pointer-events", "none");
@@ -160,7 +159,7 @@ function isFocusable(element) {
160
159
  * WAI-ARIA compliant disclosure pattern implementation in TypeScript.
161
160
  * Using the <details> and <summary> element.
162
161
  *
163
- * @version 1.2.2
162
+ * @version 1.2.3
164
163
  * @author Yusuke Kamiyamane
165
164
  * @license MIT
166
165
  * @copyright Copyright (c) Yusuke Kamiyamane
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@y14e/disclosure-css",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "WAI-ARIA compliant disclosure pattern implementation in TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",