Skip to content

Commit 00d9bb7

Browse files
committed
fix(#54): address round-2 Copilot review (lowercase tag for case-insensitive HTML match)
1 parent be757a1 commit 00d9bb7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/rules/template-require-mandatory-role-attributes.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ function getStaticAttrValue(node, name) {
5555

5656
function getTagName(node) {
5757
if (node?.type === 'GlimmerElementNode') {
58-
return node.tag;
58+
// HTML tag names are case-insensitive; normalize so <INPUT>/<Input> match
59+
// the lowercase keys in AX_CONCEPTS_BY_TAG and the semantic-role maps.
60+
return node.tag?.toLowerCase();
5961
}
6062
if (node?.type === 'GlimmerMustacheStatement' && node.path?.original === 'input') {
6163
// The classic `{{input}}` helper renders a native <input>.

0 commit comments

Comments
 (0)