diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index 3ab6a2251518..5cc44ce15f87 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -764,10 +764,11 @@ export default class Element extends Node { }); } + const has_dynamic_role = attribute_map.get('role') && !attribute_map.get('role').is_static; + // no-static-element-interactions - // TODO: investigate footer - // TODO: investigate dynamic roles if ( + !has_dynamic_role && !is_hidden_from_screen_reader(this.name, attribute_map) && !is_presentation_role(role) && !is_interactive_element(this.name, attribute_map) && diff --git a/test/validator/samples/a11y-no-static-element-interactions/input.svelte b/test/validator/samples/a11y-no-static-element-interactions/input.svelte index 90d4669252a0..96b5c369cc01 100644 --- a/test/validator/samples/a11y-no-static-element-interactions/input.svelte +++ b/test/validator/samples/a11y-no-static-element-interactions/input.svelte @@ -1,9 +1,14 @@ + +