Slack’s Journey to Accessible Software: Automated Testing with Axe and Playwright

Jump to

Slack has taken a significant step toward improving accessibility by integrating automated testing into its software development lifecycle. This initiative aims to enhance the user experience for individuals with disabilities, aligning with Slack’s commitment to inclusivity and adherence to the Web Content Accessibility Guidelines (WCAG).

Commitment to Accessibility Standards

Slack has long maintained internal standards for accessibility, complemented by collaborations with external testers. These efforts are rooted in WCAG, an internationally recognized benchmark for web accessibility. While manual testing remains essential for identifying nuanced issues, Slack identified the need to complement these efforts with automation to address accessibility violations more efficiently.

Incorporating Automation into Development

In 2022, Slack began incorporating automated accessibility tests into its development workflow. The company selected Axe, a popular accessibility testing tool known for its flexibility and alignment with WCAG standards. However, integrating Axe into Slack’s existing test frameworks presented challenges. Embedding Axe checks within React Testing Library (RTL) and Jest caused conflicts that complicated the development process.

To overcome these obstacles, the accessibility team explored using Playwright, a versatile testing framework compatible with Axe via the @axe-core/playwright package. However, integrating Axe checks into Playwright’s Locator object also posed technical difficulties.

Customized Approach to Accessibility Testing

Slack adopted a tailored approach to address these challenges. The team strategically added accessibility checks in Playwright tests after key user interactions, ensuring that content was fully rendered before testing. They customized Axe checks by filtering out irrelevant rules and prioritizing critical violations. These checks were integrated into Playwright’s fixture model, enabling developers to use a custom function called runAxeAndSaveViolations to trigger tests within specifications.

This method allowed Slack to streamline its accessibility testing process while maintaining flexibility in addressing specific issues.

Improving Reporting and Collaboration

To enhance reporting capabilities, Slack incorporated violation details and screenshots using Playwright’s HTML Reporter and customized error messages. The team developed a non-blocking test suite that mirrored critical functionality tests while adding accessibility checks to avoid redundancy. Developers were empowered to run tests locally, schedule periodic runs, or integrate them into continuous integration (CI) pipelines.

Collaboration between the accessibility team and developers was essential for triaging automated violations. A Jira-based workflow was implemented to track and resolve issues efficiently.

Community Recognition

Slack’s detailed approach garnered attention from the tech community on platforms like Hacker News. One of the maintainers of the Axe accessibility engine praised Slack’s efforts, highlighting their deep integration with Playwright and the prioritization of specific features. This feedback underscored the impact of Slack’s work on advancing accessibility practices in software development.

Regular Audits and AI Integration

To ensure comprehensive coverage and prevent duplicate checks, Slack conducts regular audits of its accessibility testing processes. The company is also exploring AI-driven solutions to automate audit processes further and refine test results.

Future Plans for Accessibility Testing

Slack aims to continue balancing automation with manual testing to achieve optimal results. Future developments include implementing blocking tests for essential functionalities like keyboard navigation and leveraging AI technologies to automate the placement of accessibility checks.

Conclusion

Slack’s integration of automated accessibility testing marks a significant milestone in its commitment to creating an inclusive platform for all users. By combining tools like Axe and Playwright with customized strategies, Slack has streamlined its development process while addressing critical accessibility concerns.

As the company continues refining its approach through AI-driven solutions and enhanced testing strategies, it sets an example for other organizations aiming to prioritize inclusivity in their software development practices.

Read more such articles from our Newsletter here.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may also like

Categories
Scroll to Top