WordPress Core Committer Jb Audras, CTO of the France-based Whodunit agency, has released two new accessibility plugins in cooperation with Guillaume Turpin, another developer on the Whodunit team. These are small “micro” plugins developed to fill gaps in the block editor’s accessible content creation experience.
The first plugin is called Lang Attribute for the Block Editor and is important for content that is written in multiple languages. It allows content creators to indicate language changes using the lang attribute so that those using assistive technologies will get the correct presentation and pronunciation rules for the specified language. This plugin helps WordPress sites meet the requirements of the WCAG Success Criterion 3.1.2 “Language of Parts.”
With the plugin installed, content creators can highlight text and then find the language attribute in the block toolbar to edit it.
“It’s worth noting that indicating language changes in content is mandatory for WCAG compliance, and there is currently no way to do that in the Block Editor (except by editing the code manually),” Audras said when introducing the plugin on Twitter. “I think this feature should be implemented natively into Gutenberg.”
The second micro plugin is called Abbreviation Button for the Block Editor, which allows content authors to include definitions for abbreviations using the <abbr> HTML element. This enables site visitors to access the expanded form of abbreviations, as outlined by WCAG success criterion 3.1.4 “Abbreviations.”
The WCAG identify a few types of visitors who may be helped by the Abbreviations, including those who have difficulty decoding words, those who rely on screen magnifiers, have a limited memory, and those who have difficulty using context to aid understanding.
The abbreviation tag can also be found in the block toolbar, so users can highlight any text for which they want to provide the expanded form of the abbreviation.
Both the Abbreviation Button and the Language Attribute plugins are available for free in the WordPress plugins directory. The plugins’ creators hope that some of this functionality can eventually be added to the block editor, but in the meantime users can install the plugins to create more accessible content that meets accessibility guidelines.
Basic web platform features like this should be built into to the editor, doubly so for accessibility features.
(However, the element doesn’t actually do much useful from an accessibility standpoint)