Skip to content

This WordPress plugin adds settings to improve accessibility and automatically corrects accessibility issues.

Notifications You must be signed in to change notification settings

MarieComet/better-accessibility

Repository files navigation

Better Accessibility

Description

This WordPress plugin adds settings to improve accessibility and automatically corrects accessibility issues. It gathers several small improvements implemented during my projects. It might not fit you 100%, it has no settings pages.

What it does

Menus

  • Removes the "Title attribute" field from menu items
  • Automatically adds an aria-label containing "menu title (new tab)" attribute to links that open in a new tab (target blank)
  • Replace empty link (href="#") by span
  • Adds an aria-label field to menu items (which is automatically filled with "menu aria label (new tab)" if the link opens in a new tab).

For example, a menu item linked to a Twitter account, which open in a new tab, with "Twitter" as navigation label, with "Visit the twitter profile of Marie Comet" as Aria label :

image

Will be turned into : <a target="_blank" rel="noopener" href="https://twitter.com/CometMarie" aria-label="Visit the twitter profile of Marie Comet (new tab)">Twitter</a>

Editor

General

  • Register a new format type "Hide Visually" (Block Toolbar), which add a new format option to visually hide part of text (with .screen-reader-text class). Usefull to provide better link text to people using screen readers text.

image

Button block

  • Automatically adds an aria-label containing "button text (new tab)" attribute to links that open in a new tab (target blank)
  • Adds an aria-label setting to Block Toolbar (which is automatically filled with "button aria label (new tab)" if the link opens in a new tab)

image

Image Block (with link)

  • Automatically adds an aria-label containing "image alt text (new tab)" attribute to image link that open in a new tab (target blank)
  • Adds an aria-label setting to Block Toolbar (which is automatically filled with "image alt text (new tab)" if the link opens in a new tab)

Separator block

  • Automattically hide separator block for screen readers (adds aria-hidden="true" to <hr>)

Available in French and English.

About

This WordPress plugin adds settings to improve accessibility and automatically corrects accessibility issues.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published