Skip to content

Commit d4b2857

Browse files
authored
chore(alt-space-value): use virtualNode instead of node (dequelabs#1924)
1 parent 6db28bc commit d4b2857

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/checks/label/alt-space-value.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
const validAttrValue = /^\s+$/.test(node.getAttribute('alt'));
2-
return node.hasAttribute('alt') && validAttrValue;
1+
const alt = virtualNode.attr('alt');
2+
const isOnlySpace = /^\s+$/;
3+
return typeof alt === 'string' && isOnlySpace.test(alt);

0 commit comments

Comments
 (0)