We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6db28bc commit d4b2857Copy full SHA for d4b2857
lib/checks/label/alt-space-value.js
@@ -1,2 +1,3 @@
1
-const validAttrValue = /^\s+$/.test(node.getAttribute('alt'));
2
-return node.hasAttribute('alt') && validAttrValue;
+const alt = virtualNode.attr('alt');
+const isOnlySpace = /^\s+$/;
3
+return typeof alt === 'string' && isOnlySpace.test(alt);
0 commit comments