Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (name) {
const normalizedName = name.toLowerCase();
if (normalizedName.indexOf('aria-') !== 0) {
return;
}
const isValid = [...aria.keys()].indexOf(normalizedName) > -1;
if (isValid) {
return
}
context.report({
node,
message: `${name}: This attribute is an invalid ARIA attribute.`
});
}
}
}, altRule.create(context))
}
};