From 7b50e3e60e49fd54126c80a5495e9b3889214408 Mon Sep 17 00:00:00 2001 From: Willy Woitas Date: Thu, 27 Jun 2024 00:13:54 +0200 Subject: [PATCH] Update image-has-alt.js --- src/lib/helpers/a11y-rules/image-has-alt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/helpers/a11y-rules/image-has-alt.js b/src/lib/helpers/a11y-rules/image-has-alt.js index 75fbe8d..de4f8d6 100644 --- a/src/lib/helpers/a11y-rules/image-has-alt.js +++ b/src/lib/helpers/a11y-rules/image-has-alt.js @@ -3,7 +3,7 @@ export default { isActive: false, test: (dom) => { let nodes = Array.from(dom?.querySelectorAll("img")); - let nodesWithoutAlt = nodes.filter((img) => img.getAttribute("alt") === (undefined || '')); + let nodesWithoutAlt = nodes.filter((img) => img.getAttribute("alt") === (undefined || null || '')); console.debug('nodes:', nodes); console.debug('nodesWithoutAlt:', nodesWithoutAlt);