@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 +3 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -4
- package/package.json +1 -1
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.#
|
|
98
|
-
const summary = this.#summaryElements[i];
|
|
97
|
+
this.#summaryElements.forEach((summary) => {
|
|
99
98
|
if (!summary) {
|
|
100
99
|
return;
|
|
101
100
|
}
|
|
102
|
-
if (!isFocusable(
|
|
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.
|
|
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
package/dist/index.d.ts
CHANGED
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.#
|
|
96
|
-
const summary = this.#summaryElements[i];
|
|
95
|
+
this.#summaryElements.forEach((summary) => {
|
|
97
96
|
if (!summary) {
|
|
98
97
|
return;
|
|
99
98
|
}
|
|
100
|
-
if (!isFocusable(
|
|
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.
|
|
162
|
+
* @version 1.2.3
|
|
164
163
|
* @author Yusuke Kamiyamane
|
|
165
164
|
* @license MIT
|
|
166
165
|
* @copyright Copyright (c) Yusuke Kamiyamane
|