Max Design

Published:

This follows on from my recent article: Using the browser console for accessibility testing - Part 2.

I converted one of those console scripts into a standalone bookmarklet. Unlike console scripts, bookmarklets require no DevTools, no installation, and work in any browser.

Usage

Drag the following bookmarklet into your address bar:

Highlight roles that must never have author-provided names

Click the bookmarklet on any page to highlight elements with name-prohibited roles. Any violations found will be outlined in red with a label identifying the role and the prohibited name.

You can test it on this sample page: Testing accessibility console scripts

What's it about?

Some ARIA roles are defined as "name prohibited". This means authors must not give them an accessible name via any method, including aria-label or aria-labelledby.

If one of these roles is given an accessible name, assistive technologies may ignore it, announce it unexpectedly, or behave inconsistently.

In ARIA 1.2, the name-prohibited roles are:

ARIA 1.3 (currently a working draft) adds these name-prohibited roles: