diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts
index 2410904d6301..44d84f756671 100644
--- a/src/compiler/compile/nodes/Element.ts
+++ b/src/compiler/compile/nodes/Element.ts
@@ -121,6 +121,7 @@ const a11y_implicit_semantics = new Map([
['details', 'group'],
['dt', 'term'],
['fieldset', 'group'],
+ ['figure', 'figure'],
['form', 'form'],
['h1', 'heading'],
['h2', 'heading'],
@@ -132,6 +133,7 @@ const a11y_implicit_semantics = new Map([
['img', 'img'],
['li', 'listitem'],
['link', 'link'],
+ ['main', 'main'],
['menu', 'list'],
['meter', 'progressbar'],
['nav', 'navigation'],
@@ -142,6 +144,7 @@ const a11y_implicit_semantics = new Map([
['progress', 'progressbar'],
['section', 'region'],
['summary', 'button'],
+ ['table', 'table'],
['tbody', 'rowgroup'],
['textarea', 'textbox'],
['tfoot', 'rowgroup'],
@@ -631,9 +634,7 @@ export default class Element extends Node {
}
// no-redundant-roles
- const has_redundant_role = current_role === get_implicit_role(this.name, attribute_map);
-
- if (this.name === current_role || has_redundant_role) {
+ if (current_role === get_implicit_role(this.name, attribute_map)) {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(current_role));
}
diff --git a/test/validator/samples/a11y-no-redundant-roles/input.svelte b/test/validator/samples/a11y-no-redundant-roles/input.svelte
index 05525effb628..537d5c0fd3c1 100644
--- a/test/validator/samples/a11y-no-redundant-roles/input.svelte
+++ b/test/validator/samples/a11y-no-redundant-roles/input.svelte
@@ -41,4 +41,8 @@