@ -121,6 +121,7 @@ const a11y_implicit_semantics = new Map([
[ 'details' , 'group' ] ,
[ 'details' , 'group' ] ,
[ 'dt' , 'term' ] ,
[ 'dt' , 'term' ] ,
[ 'fieldset' , 'group' ] ,
[ 'fieldset' , 'group' ] ,
[ 'figure' , 'figure' ] ,
[ 'form' , 'form' ] ,
[ 'form' , 'form' ] ,
[ 'h1' , 'heading' ] ,
[ 'h1' , 'heading' ] ,
[ 'h2' , 'heading' ] ,
[ 'h2' , 'heading' ] ,
@ -132,6 +133,7 @@ const a11y_implicit_semantics = new Map([
[ 'img' , 'img' ] ,
[ 'img' , 'img' ] ,
[ 'li' , 'listitem' ] ,
[ 'li' , 'listitem' ] ,
[ 'link' , 'link' ] ,
[ 'link' , 'link' ] ,
[ 'main' , 'main' ] ,
[ 'menu' , 'list' ] ,
[ 'menu' , 'list' ] ,
[ 'meter' , 'progressbar' ] ,
[ 'meter' , 'progressbar' ] ,
[ 'nav' , 'navigation' ] ,
[ 'nav' , 'navigation' ] ,
@ -142,6 +144,7 @@ const a11y_implicit_semantics = new Map([
[ 'progress' , 'progressbar' ] ,
[ 'progress' , 'progressbar' ] ,
[ 'section' , 'region' ] ,
[ 'section' , 'region' ] ,
[ 'summary' , 'button' ] ,
[ 'summary' , 'button' ] ,
[ 'table' , 'table' ] ,
[ 'tbody' , 'rowgroup' ] ,
[ 'tbody' , 'rowgroup' ] ,
[ 'textarea' , 'textbox' ] ,
[ 'textarea' , 'textbox' ] ,
[ 'tfoot' , 'rowgroup' ] ,
[ 'tfoot' , 'rowgroup' ] ,
@ -631,9 +634,7 @@ export default class Element extends Node {
}
}
// no-redundant-roles
// no-redundant-roles
const has_redundant_role = current_role === get_implicit_role ( this . name , attribute_map ) ;
if ( current_role === get_implicit_role ( this . name , attribute_map ) ) {
if ( this . name === current_role || has_redundant_role ) {
component . warn ( attribute , compiler_warnings . a11y_no_redundant_roles ( current_role ) ) ;
component . warn ( attribute , compiler_warnings . a11y_no_redundant_roles ( current_role ) ) ;
}
}