correct linting issues

pull/7067/head
James Bradbury 5 years ago
parent 12afce72bf
commit 30c0352410

@ -354,33 +354,33 @@ export default class Element extends Node {
// no-redundant-roles // no-redundant-roles
if (this.name === value) { if (this.name === value) {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value)) component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value));
} }
if (this.name === 'nav' && value === 'navigation') { if (this.name === 'nav' && value === 'navigation') {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value)) component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value));
} }
if (this.name === 'a' && value === 'link') { if (this.name === 'a' && value === 'link') {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value)) component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value));
} }
if (this.name === 'fieldset' && value === 'group') { if (this.name === 'fieldset' && value === 'group') {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value)) component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value));
} }
if (this.name === 'ul' && value === 'list') { if (this.name === 'ul' && value === 'list') {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value)) component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value));
} }
if (this.name === 'main' && value === 'main') { if (this.name === 'main' && value === 'main') {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value)) component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value));
} }
let { parent } = this; let { parent } = this;
let is_parent_section_or_article = false; let is_parent_section_or_article = false;
while (parent) { while (parent) {
let parent_name = (parent as Element).name const parent_name = (parent as Element).name;
if ( parent_name === 'section' || parent_name === 'article') { if ( parent_name === 'section' || parent_name === 'article') {
is_parent_section_or_article = true; is_parent_section_or_article = true;
break; break;
@ -392,11 +392,11 @@ export default class Element extends Node {
} }
if (this.name === 'header' && value === 'banner' && !is_parent_section_or_article) { if (this.name === 'header' && value === 'banner' && !is_parent_section_or_article) {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value)) component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value));
} }
if (this.name === 'footer' && value === 'contentinfo' && !is_parent_section_or_article) { if (this.name === 'footer' && value === 'contentinfo' && !is_parent_section_or_article) {
component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value)) component.warn(attribute, compiler_warnings.a11y_no_redundant_roles(value));
} }
} }

Loading…
Cancel
Save