Automated accessibility tests - GlButton
Description
Implement automated accessibility tests for the GlButton component. Automated accessibility tests use the axe-core engine to find issues on GitLab UI components.
What to test?
-
variant: default, categories: primary and tertiary, states: active, hover, focus. -
variant: confirm, categories: primary, secondary, and tertiary, states: active, hover, focus. -
variant: success, categories: primary, secondary, and tertiary, states: active, hover, focus. -
variant: danger, categories: primary, secondary, and tertiary, states: active, hover, focus. -
variant: dashed, states: active, hover, focus. -
variant: link, states: active, hover, focus. -
selected state -
disabled state -
dropdown button -
icon button
How to write tests?
Implementation guide
Read the axe accessibility test documentation to learn how to implement automated A11Y tests using the axe-core addon in Cypress.
Implementation examples
- You can check out our pairing session on YouTube, where we implement tests for GlLabel component: https://youtu.be/FQ985DWwfCM
- Here's the MR with the implemented tests: !3769 (merged)
Edited by Paulina Sedlak-Jakubowska