Skip to content

campuspress/divi-accessibility

Repository files navigation

divi-accessibility

wordpress.org version badgewordpress.org download count badge

A WordPress plugin that improves Divi accessibility in accordance with WCAG 2.0 guidelines. While there are many great plugins dealing with improving WordPress theme accessibility, this was developed for issuesspecificallyfound within Divi.

Features

  • Adds appropriate ARIA attributes
  • Improved keyboard navigation in menus
  • Fixes missing & incorrectly assigned labels
  • Makes modules such asToggle&Accordionfocusable and keyboard interactive
  • Adds a visual outline to focusable elements forkeyboard onlynavigation
  • Ability to changekeyboard onlyoutline color
  • Fixes Divi incorrectly using screen reader classes
  • Adds skip navigation link optimized for Divi markup
  • Hide icons from screen readers which can affect reading of text
  • Fix duplicate menu IDs
  • Tota11y integration

Development

The working js/css snippets are, by default, included minified. They can be forcefully included in their full expanded state by enabling the developer mode option in plugin settings. They will also respect the WP coreSCRIPTS_DEBUGdefine value.

To check js/css snippets for any errors, run the dedicatednpm run lintscript.

To build the minified versions of the js/css snippets, runnpm run buildscript.

While working on snippets, it may be beneficial to have them automatically re-built on file change. This is what thenpm run watchscript does.

To package an intermediate (throwaway) plugin zip archive for testing, use thenpm run packagescript.

To actually build a releaseable package, use thenpm run release [-y] [--version=X.X.X].This will lint everything, build the languages catalog file, and normalize version numbers across files (main php file, package.json and readme.txt). It will then rebuild everything and produce a versioned zip archive.

The release version can either be supplied via a command line parameter (--version=x.x.x), or it will be inferred from the files that might be containing the version number (main php file and package.json). If the version number is being inferred, the highest one is the version that will be used.

If the final resolved release version is different than what's in package.json and/or main php file, they can optionally be updated to match. By default, the prerelease script will ask for user input whether to do this or not. This can be prevented using the command line flag-y- if this command line flag is set, the files will always be updated if necessary without any further input.

Resources

Support

If you would like to make a donation, we encourage you to consider donating toKnowbilityand help support their mission to provide access to technology for people with disabilities.

Credit

Plugin created byCampusPress.Plugin icon based off ofThe Accessible Icon Project.