Refactor: export a11y-no-nointeractive-tabindex warning from compiler_warning

pull/6693/head
shinyaigeek 5 years ago committed by tanhauhau
parent 8998079d03
commit 2d0e13a504

@ -179,6 +179,10 @@ export default {
code: 'a11y-missing-content',
message: `A11y: <${name}> element should have child content`
}),
a11y_no_nointeractive_tabindex: {
code: 'a11y-no-nointeractive-tabindex',
message: 'A11y: not interactive element cannot have positive tabIndex value'
},
redundant_event_modifier_for_touch: {
code: 'redundant-event-modifier',
message: 'Touch event handlers that don\'t use the \'event\' object are passive by default'

@ -561,10 +561,7 @@ export default class Element extends Node {
if (_tabIndexValue) {
const tabIndexValue = Number(_tabIndexValue.get_static_value());
if (!isNaN(tabIndexValue) && tabIndexValue >= 0) {
component.warn(this, {
code: 'a11y-no-nointeractive-tabindex',
message: 'A11y: not interactive element cannot have positive tabIndex value'
});
component.warn(this, compiler_warnings.a11y_no_nointeractive_tabindex);
}
}
}

Loading…
Cancel
Save