Skip to content

Commit

Permalink
Update image-has-alt.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dutscher committed Jun 26, 2024
1 parent 7b50e3e commit b69741a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/helpers/a11y-rules/image-has-alt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b69741a

Please sign in to comment.