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);