vrembem 3.0.11 → 4.0.0-alpha.1

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.
@@ -132,19 +132,29 @@ class Collection {
132
132
  }
133
133
  }
134
134
 
135
+ const not = {
136
+ inert: ':not([inert]):not([inert] *)',
137
+ negTabIndex: ':not([tabindex^="-"])',
138
+ disabled: ':not(:disabled)',
139
+ };
140
+
135
141
  var e = [
136
- 'a[href]:not([tabindex^="-"])',
137
- 'area[href]:not([tabindex^="-"])',
138
- 'input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])',
139
- 'input[type="radio"]:not([disabled]):not([tabindex^="-"])',
140
- 'select:not([disabled]):not([tabindex^="-"])',
141
- 'textarea:not([disabled]):not([tabindex^="-"])',
142
- 'button:not([disabled]):not([tabindex^="-"])',
143
- 'iframe:not([tabindex^="-"])',
144
- 'audio[controls]:not([tabindex^="-"])',
145
- 'video[controls]:not([tabindex^="-"])',
146
- '[contenteditable]:not([tabindex^="-"])',
147
- '[tabindex]:not([tabindex^="-"])',
142
+ `a[href]${not.inert}${not.negTabIndex}`,
143
+ `area[href]${not.inert}${not.negTabIndex}`,
144
+ `input:not([type="hidden"]):not([type="radio"])${not.inert}${not.negTabIndex}${not.disabled}`,
145
+ `input[type="radio"]${not.inert}${not.negTabIndex}${not.disabled}`,
146
+ `select${not.inert}${not.negTabIndex}${not.disabled}`,
147
+ `textarea${not.inert}${not.negTabIndex}${not.disabled}`,
148
+ `button${not.inert}${not.negTabIndex}${not.disabled}`,
149
+ `details${not.inert} > summary:first-of-type${not.negTabIndex}`,
150
+ // Discard until Firefox supports `:has()`
151
+ // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
152
+ // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
153
+ `iframe${not.inert}${not.negTabIndex}`,
154
+ `audio[controls]${not.inert}${not.negTabIndex}`,
155
+ `video[controls]${not.inert}${not.negTabIndex}`,
156
+ `[contenteditable]${not.inert}${not.negTabIndex}`,
157
+ `[tabindex]${not.inert}${not.negTabIndex}`,
148
158
  ];
149
159
 
150
160
  var _focusable = /*#__PURE__*/_classPrivateFieldLooseKey("focusable");