From c2dfe464ffedbdefdf56301806b87c62954f3cbf Mon Sep 17 00:00:00 2001 From: pooja0504 Date: Mon, 24 Jun 2024 16:21:49 +0530 Subject: [PATCH] AXE-197 : excluded select and textarea components --- lib/checks/forms/autocomplete-a11y-evaluate.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/checks/forms/autocomplete-a11y-evaluate.js b/lib/checks/forms/autocomplete-a11y-evaluate.js index 229dad3c..b635c9bf 100644 --- a/lib/checks/forms/autocomplete-a11y-evaluate.js +++ b/lib/checks/forms/autocomplete-a11y-evaluate.js @@ -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 (