Add comprehensive .gitignore
This commit is contained in:
33
maternal-web/lib/accessibility/axe.ts
Normal file
33
maternal-web/lib/accessibility/axe.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
// Accessibility testing with axe-core
|
||||
// Only runs in development mode
|
||||
|
||||
if (typeof window !== 'undefined' && process.env.NODE_ENV === 'development') {
|
||||
import('@axe-core/react').then((axe) => {
|
||||
const React = require('react');
|
||||
const ReactDOM = require('react-dom');
|
||||
|
||||
axe.default(React, ReactDOM, 1000, {
|
||||
// Configure axe rules
|
||||
rules: [
|
||||
{
|
||||
id: 'color-contrast',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
id: 'label',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
id: 'button-name',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
id: 'link-name',
|
||||
enabled: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export {}
|
||||
Reference in New Issue
Block a user