
To show the Accessibility Helper in Chrome's Inspect Element, you need to open the Chrome DevTools by pressing F12 or right-clicking on the page and selecting Inspect.
The Accessibility Helper is a powerful tool that provides real-time feedback on your website's accessibility features, such as color contrast, font sizes, and keyboard navigation.
To access the Accessibility Helper, click on the three dots in the top right corner of the DevTools panel and select More tools > Accessibility.
Accessing Chrome DevTools
To access Chrome DevTools, you can right-click on a page element and select "Inspect" from the context menu, which opens the DevTools panel.
The DevTools panel is divided into several sections, including the Elements, Console, and Sources tabs, each providing a unique perspective on your webpage's structure and functionality.
To show the Accessibility Helper in Chrome DevTools, you'll need to navigate to the Elements tab, where you can find the Accessibility panel.
In the Accessibility panel, you can analyze your webpage's accessibility by checking for ARIA attributes, semantic HTML, and other accessibility features.
The Accessibility Helper is a powerful tool that can help you identify and fix accessibility issues on your webpage, making it more usable for people with disabilities.
Inspecting Accessibility
Inspecting accessibility is an essential part of ensuring your web page is usable by everyone. You can see a lot of information about an element's accessibility by simply hovering over it. The tool tip will give you information on color contrast, keyboard accessibility, name, and role at a glance.
To get a better understanding of how your webpage is structured, you can use the accessibility tree in DevTools. This tree only includes elements that are relevant for accessibility, such as text nodes, links, images, or form controls.
Firefox has a dedicated Accessibility tool, but Chrome also provides some useful features. By hovering over nodes in the accessibility tree, you can see which DOM elements they correspond to. This can be really helpful for identifying issues with your page's structure.
If you want to inspect elements more closely, you can do so by selecting nodes in the accessibility tree. This will reveal their accessibility properties in the sidebar. You can also use the toolbar to check for more issues, such as tabbing order or simulating color vision deficiencies.
Here are some key features of the Accessibility tool in DevTools:
- Hovering over nodes highlights the corresponding DOM elements in the page.
- Selecting nodes reveals their accessibility properties in the sidebar.
- Accessibility issues are displayed next to the corresponding nodes in the tree.
- Checking for more issues, tabbing order, or simulating color vision deficiencies from the toolbar.
Debugging Accessibility Issues
Debugging accessibility issues can be a challenge, but there's a magical place called "Accessibility Properties" in Chrome DevTools that can help you out. This feature lives within your DevTools in the Elements panel, and it's a game-changer for debugging issues with ARIA roles/attributes and colour issues.
You can access this feature by selecting an element and looking for a list of properties that can help you validate ARIA roles/attributes and debug colour issues, focus/visibility roles, and text computation. This is especially helpful with elements like modals where something is focusable but behind other content and needs adjusting.
Focus and visibility are two examples of things to be conscious of when developing so people are able to navigate via keyboard. It's essential to double-check these and other WordPress standards as you're developing your theme.
The "Accessibility Properties" feature also shows you the current contrast ratio of your element and suggests a colour value pair to match the WCAG AA or AAA recommendation. WordPress aims to maintain contrast at the WCAG AA level, which means a ratio of 4.5:1 for normal text and 3:1 for large text.
You can even toggle to test what that would look like by clicking on the square icon to the right of the hex values. This is particularly useful for small elements that might fall under the radar, like buttons or other interactive elements.
Emulate Vision Deficiencies
To emulate vision deficiencies in Chrome, press Cmd + Shift + P in the console. This will open up the Command Menu.
You can then select or type 'Show Rendering' to access the option to emulate vision deficiencies.
Sources
- https://devtoolstips.org/tips/en/see-accessibility-tree/
- https://dev.to/josefine/accessibility-testing-with-chrome-devtools-2bl4
- https://stackoverflow.com/questions/58988357/accessing-the-accessibility-tree-of-a-website
- https://webdevstudios.com/2017/03/06/accessibility-chrome-devtools/
- https://www.sitepen.com/blog/accessibility-inspectors-a-basic-guide
Featured Images: pexels.com