Skip to content

Commit d8ba4b0

Browse files
jessebeachbeefancohen
authored andcommitted
Fixing failing test in isInteractiveElement.js
1 parent a94bb85 commit d8ba4b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/util/isInteractiveElement.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ export const interactiveElementsMap = {
2020
return href !== undefined || tabIndex !== undefined;
2121
},
2222
// This is same as `a` interactivity function
23-
area: attributes => interactiveElementsMap.a(attributes),
23+
area: (attributes) => {
24+
const href = getPropValue(getProp(attributes, 'href'));
25+
const tabIndex = getTabIndex(getProp(attributes, 'tabIndex'));
26+
return href !== undefined || tabIndex !== undefined;
27+
},
2428
input: (attributes) => {
2529
const typeAttr = getLiteralPropValue(getProp(attributes, 'type'));
2630
return typeAttr ? typeAttr.toUpperCase() !== 'HIDDEN' : true;

0 commit comments

Comments
 (0)