From f71a6813b7bf9c53b1dce0b5f3a1232f55b1f26a Mon Sep 17 00:00:00 2001
From: Artyom Alekseevich <47069814+FrankFMY@users.noreply.github.com>
Date: Fri, 6 Feb 2026 17:13:54 +0100
Subject: [PATCH] fix: treat menu element like ul/ol for a11y role checks
(#17638)
* treat menu element like ul/ol for a11y role checks
The
and ,
so it should receive the same treatment in a11y checks:
- Allow
is ok because CSS list-style:none removes the semantics and this is a way to bring them back
- !['ul', 'ol', 'li'].includes(node.name) &&
+ !['ul', 'ol', 'li', 'menu'].includes(node.name) &&
// is ok because without href the a tag doesn't have a role of link
!(node.name === 'a' && !attribute_map.has('href'))
) {
diff --git a/packages/svelte/tests/validator/samples/a11y-no-noninteractive-element-to-interactive-role/input.svelte b/packages/svelte/tests/validator/samples/a11y-no-noninteractive-element-to-interactive-role/input.svelte
index e5db8719b0..edfa3eeada 100644
--- a/packages/svelte/tests/validator/samples/a11y-no-noninteractive-element-to-interactive-role/input.svelte
+++ b/packages/svelte/tests/validator/samples/a11y-no-noninteractive-element-to-interactive-role/input.svelte
@@ -69,6 +69,13 @@
+
+