Block Accessibility Checks is a WordPress plugin that helps ensures your content meets WCAG (Web Content Accessibility Guidelines) requirements. This plugin integrates seamlessly with the Gutenberg editor to check your core block configurations for accessibility issues, preventing users from publishing content that doesn't comply with WCAG standards.
- Real-time Accessibility Checks: Automatically checks core block configurations as you edit content in the Gutenberg editor.
- Prevents Non-Compliant Publishing: Blocks the publishing of content that fails to meet WCAG requirements.
- User-Friendly Notifications: Provides clear and actionable feedback to help users fix accessibility issues.
- Upload the plugin files to the
/wp-content/plugins/
- Activate the plugin through the
Plugins
screen in WordPress - Start editing your content in the Gutenberg editor
If you would like to get involved and help make this plugin better that would be awesome! We all win with more accessible content.
To get started do the following:
- Fork this repo
- Create a branch off of
main
- Open a terminal window and clone your fork
- Using a terminal run the following inside the forked repo
npm -g i @wordpress/env
-- installs wp-env if you don't already have itnpm install
-- installs dependencies for this project
This repo uses @wordpress/env that setups up a local WordPress environment using Docker.
- Make sure
Docker Desktop
is running - Start WordPress:
wp-env start
- Stop WordPress:
wp-env stop
- Start watch task:
npm run start
- Build assets:
npm run build
When you are done developing a feature or a fix:
- Create a PR from your branch into the primary repo
- Fill out relevant info in as much detail as possible in the PR template
- http://localhost:8888
- User:
admin
- Password:
password
Important: when you're done working don't forget to stop the WordPress docker environment by running npm run wp:down
TODO: add git issue templates
The following is a list of checks that are happening on core blocks.
Block | Description |
---|---|
core/button | Checks for text and link on each button |
core/heading | Prevents the usage of an level one heading in the content |
core/gallery | Checks for alternative text on an image |
core/image | Checks for alternative text on an image |
core/image | Adds a toggle to confirm image use as decorative allowing for bypass a11y check |
core/table | Checks for a table header row on each individual table block |