Reputation: 14565
I started getting unusual colour contrast reports from axe-core.js. The weird part is the colours do not match any of the css rules for foreground or background for the page.
I changed the method to call the axe validator and defer when I called the axe library in hopes that it axe was being tricked by the page still rendering fonts and colours, but this did not help. the code I am using is below:
Has anyone else had a similar situation ?
window.onload = () => {
document.fonts.ready.then(() => {
requestIdleCallback(() => {
console.log('Page is fully loaded, fonts are ready, and browser is idle.');
axe
.run()
.then(results => {
if (results.violations.length) {
throw new Error('Accessibility issues found');
}
})
.catch(err => {
console.error('Something bad happened:', err.message);
});
});
});
};
Upvotes: 0
Views: 37