diff --git a/.changeset/pretty-tools-whisper.md b/.changeset/pretty-tools-whisper.md new file mode 100644 index 0000000000..8af633242f --- /dev/null +++ b/.changeset/pretty-tools-whisper.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: relax a11y "no redundant role" rule for li, ul, ol diff --git a/packages/svelte/src/compiler/compile/nodes/Element.js b/packages/svelte/src/compiler/compile/nodes/Element.js index 3b18ce0e94..ecefb0c34e 100644 --- a/packages/svelte/src/compiler/compile/nodes/Element.js +++ b/packages/svelte/src/compiler/compile/nodes/Element.js @@ -694,7 +694,11 @@ export default class Element extends Node { ); } // no-redundant-roles - if (current_role === get_implicit_role(this.name, attribute_map)) { + if ( + current_role === get_implicit_role(this.name, attribute_map) && + //