first commit
This commit is contained in:
13
node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs
generated
vendored
Normal file
13
node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
const focusableElements = new Set([
|
||||
"BUTTON",
|
||||
"INPUT",
|
||||
"SELECT",
|
||||
"TEXTAREA",
|
||||
"A",
|
||||
]);
|
||||
function isElementKeyboardAccessible(element) {
|
||||
return (focusableElements.has(element.tagName) ||
|
||||
element.tabIndex !== -1);
|
||||
}
|
||||
|
||||
export { isElementKeyboardAccessible };
|
||||
Reference in New Issue
Block a user