Skip to content

Commit

Permalink
[Fix] autocomplete-valid: workaround for axe not being able to hand…
Browse files Browse the repository at this point in the history
…le `null`
  • Loading branch information
ljharb committed Jun 30, 2020
1 parent 00bd6d8 commit 2c47f0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rules/autocomplete-valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ module.exports = {
return;
}

const type = getLiteralPropValue(getProp(node.attributes, 'type'));
const { violations } = runVirtualRule('autocomplete-valid', {
nodeName: 'input',
attributes: {
autocomplete,
// Which autocomplete is valid depends on the input type
type: getLiteralPropValue(getProp(node.attributes, 'type')),
type: type === null ? undefined : type,
},
});

Expand Down

0 comments on commit 2c47f0a

Please sign in to comment.