When a website is built, especially one that uses some of the newer scripting frameworks like Angular or React, developers tend to focus on building something quickly. That practice leads sometimes to developers using less than perfectly semantic code, which is bad for accessibility. Most screen readers understand semantic code without much difficulty because it is logical and provides hierarchical structure. Sites built using division (<div>) and span (<span>) tags are not semantically based. Thus, there is a need for tools to access code failings from the perspective of a user with disabilities.
Disabilities occur in a variety of forms and the Web Content Accessibility Guidelines (WCAG) attempt to cover all of them. Accessibility has four primary goals to enable all people to navigate the Web: perceivable, operable, understandable, and robustness. Accessibility tools assess code for those attributes, although no one tool is perfect in all regards. Consequently, a developer must use a variety of tools to obtain a full picture on whether the code he or she has written will actually work from an accessibility perception. Additionally, the tools available depend on the Integrated Development Environment (IDE) in which one develops and the browser(s) in which testing occurs in most cases, although some tools are cross-browser, cross-platform, and cross-device medium.
Now to narrow the scope a bit. Working on accessibility with an Angular-based project and having worked with accessibility in PHP/WordPress-based projects, my focus will be on those tools that my team uses, namely the IDEs and browsers. As it is better to have code WCAG-ready before testing, let us start with IDEs.
Integrated Development Environments (IDE)
For those readers who do not know, an IDE, to quote Wikipedia, “is a software application that provides comprehensive facilities to computer programmers for software development.” They usually include a source code editor, build automation tools, a debugger, linting, and possibly code completion.
Microsoft VS Code
- 508/WCAG Compliance Prompter prompts the coder to review code for accessibility.
- Web Accessibility is far more useful, albeit not perfect. It primarily tests against HTML code and provides alerts for what might be lacking or makes suggestions for improvement.
The browserscape has changed much over the last few years, especially since the advent of the smartphone and its primary operating systems: Android and iOS. According to the W3Counter, the February 2019 browser distribution has Chrome with 62.5% across all platforms. Safari is second with 13.8% across macOS and iOS. Microsoft IE and Edge are a combined distant third at 7.0%, followed by Firefox at 6.3%, and Opera at 3.0%. Opera, however, rates as the second most standards-complaint browser after Chrome on desktops and ranges better on both tablets and mobile.
Chrome, Firefox, and Opera are cross-platform and mostly cross-device. Apple Safari only works with macOS, iOS, and their siblings. Microsoft Edge and IE only work on Microsoft desktops, laptops, and tablets (unless you run them in Virtual environment). Additionally, all browsers now have inspection tools, which is the best place to start. Chrome conveniently has the most tools for accessibility testing in the form of extensions. However, no tool is perfect and each has its quirks.
Below are the tools most useful in Chrome.
- The Chrome Inspector: The tool is installed by default. It is accessible via right-click and selecting Inspect (Ctrl/Cmd + Shift + I). The tool includes tabs to view html elements, the console, sources, network, and related information. Inbuilt.
- ACCESS Assistant: The browser extension exists for Chrome, Firefox, and IE 11. It allows automatic and manual accessibility testing and will generate reports. However, it produces some false positives in single-page, non-traditional sites like those built using Angular, especially on items like Angular Material checkboxes. Not free.
- ACCESS Continuum Explorer: While created by the same company as the Access Assistant, Continuum is focused on “live reloading,” which is good for testing in development. It has two versions: Pro (not free) and a more limited Community (free).
- Axe: A tool by Deque, it works from within Chrome’s Inspector. It frequently catches things that neither the Assistant nor Continuum catches, but it has its own bugs, which include demanding landmarking of the html tag itself. However, it is worth it because it provides clues on how to fix real errors.
- Landmarks: Provides a visual map of page landmarks.
- Colour Blind: Provides the ability to preview a page in various color-blind modes, e.g. protanopia, protanomaly, deuteranopia, deuteranomaly, etc.
- WCAG Accessibility Audit: Produces a report showing what errors exist. Similar to Access Assistant, but provides more detail on some matters.
- Web Developer: Provides more general tools, but allows outlining of elements, highlighting of ARIA roles, view of response headers, and many other useful development information.
Below are the tools most useful in Firefox.
- The Firefox Inspector: Unlike Chrome’s Inspector, Firefox has limited accessibility testing built into its Inspector, but it must be enabled.
- ACCESS Assistant: See above under Chrome.
- WAVE Accessibility Extension: The WebAIM tool catches a number of items that neither the inbuilt accessibility nor the ACCESS Assistant does.
Opera is a little different. It is a sweet browser, but no real accessibilities exist for it except Tenon.io, which requires a paid license. Otherwise, its inspector is the Google inspector, and it uses the Web Developer extension that is available for Chrome.
No accessibility extensions exist of which I know for Safari.
Like Firefox, some accessibility tools are built into Edge’s Inspector. Otherwise, no extensions per se exist for Edge at this time.
Microsoft Internet Explorer 11
As noted above, the ACCESS Assistant is available for IE11. Its inbuilt Inspector does not have accessibility testing built into it.
As shown above, VS Code is probably the best free IDE; although WebStorm may be a better IDE because VS Code is essentially Notepad+ on steroids. WebStorm is much more full-featured. Chrome is, in my opinion, the best browser for accessibility testing.
In conclusion, Google Chrome has the most accessibility extensions to my knowledge. Some are paid, some are free, and some have limited features until an unhindered version has been purchased. I hope this provides a good overview of IDEs and Browsers tools for accessibility testing. Please visit https://a11yproject.com/resources.html#software for more information regarding accessibility tools, and visit our other Artemis blogs for more about accessibility.