Skip to content

Commit

Permalink
Merge pull request #57 from browserstack/AXE-197_Autocomplete_Valid
Browse files Browse the repository at this point in the history
fix: (AXE-197) excluded select and textarea components
  • Loading branch information
ansh21 authored Jun 25, 2024
2 parents 5354bd0 + cb1b38a commit e208dab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/checks/forms/autocomplete-a11y-evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ function checkIsElementValidAutocomplete(node, options, virtualNode) {
return true;
}

const nodename = node.nodeName.toLowerCase();
if (!autocomplete && (nodename === 'select' || nodename === 'textarea')) {
return true;
}

// if it is on then we check whether name / id have valid autocomplete value or not
// same for the case if autocomplete is not present or has a non-standard value
if (
Expand Down

0 comments on commit e208dab

Please sign in to comment.