diff --git a/src/lib/helpers/a11y-rules/image-has-alt.js b/src/lib/helpers/a11y-rules/image-has-alt.js index de4f8d6..dcd8796 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 || null || '')); + let nodesWithoutAlt = nodes.filter((img) => !img.getAttribute("alt")); console.debug('nodes:', nodes); console.debug('nodesWithoutAlt:', nodesWithoutAlt);