docs/extend/contributing/principles/accessibility.md
Did you know {{kib}} makes a public statement about our commitment to creating an accessible product for people with disabilities? We do! It's very important all of our apps are accessible.
For the underlying commitment, see the Build accessible software by default principle.
{{kib}} maintains accessibility quality using a layered, hybrid approach:
@elastic/eslint-plugin-eui – custom rules for the ESLint libraryCI tooling: running axe-core check in FTR, Scout and Cypress tests.
Enforces: Semantics, landmarks, contrast, focus order, interaction patterns.
Note: All tests are based on the common configuration defined in src/platform/packages/shared/kbn-axe-config/index.ts.
Usage:
test/accessibility folder):const a11y = getService('a11y');
...
it('has no detectable a11y violations on load', async () => {
await common.navigateToApp('dashboard');
await a11y.testAppSnapshot();
});
page.checkA11y. Run an accessibility check on a specific root element:test('has no detectable a11y violations', async ({ page }) => {
const { violations } = await page.checkA11y({ include: ['{CSS selector of root element you are testing}'] });
expect(violations).toHaveLength(0);
});
cy.checkA11y. A custom Cypress command is available to run accessibility checks:it('has no detectable a11y violations on load', () => {
cy.checkA11y();
});