This plugin enables an A11Y Buttons block, which contains some common accessibility buttons that you usually find in a website’s top header. The idea is to provide a simple way to have them inserted in any part of your theme, without adding overlays and keep them fully customizable so they can match your design and still offer the required features.
The buttons available are:
- Skip-to-content button – Add a link to any anchored part of your website. You can create and set as many as you want;
- Contrast mode toggle – Enable a stylesheet with extremely high contrast;
- Readable font toggle – Forces usage of the Atkinson Hyperlegible Font for better readability;
- Increase/decrease/restore font-size – Change your website’s root font size. Check the F.A.Q. section about its usage.
All of the buttons have the following features:
- Order, alignment, spacing and overall layout are fully customizable;
- Text formatting, font size, text and background color, borders – if the theme supports it;
- Enabling or disabling the default icons, moving them to the left or right,
We understand that accessibility is a huge topic and that no solution is perfect. We also are by no means «experts» on the subject, so if you have any critics or suggestions, please make contact!
Want to contribute? Great! Feel free to open an issue or make a pull request.
A11y Buttons plugin, Copyright 2022 wetah
A11y Buttons plugin is distributed under the terms of the GNU GPLv3
License details: https://github.com/mateuswetah/A11Y-Buttons/blob/main/LICENSE
A11y Buttons plugin bundles the following third-party resource:
Atkinson Hyperlegible Font Copyright 2020 Braille Institute
License details: http://brailleinstitute.org/wp-content/uploads/2020/11/Atkinson-Hyperlegible-Font-License-2020-1104.pdf
Denne utvidelsen gir 2 blokker.
- A11Y Buttons A list of accessibility buttons, such as font-size changing, contrast mode and skip links. Use them to help improve your website universal access.
- A11Y Button A basic accessibility button.
This section describes how to install the plugin and get it working.
- Upload the plugin files to the
/wp-content/plugins/a11y-buttonsdirectory, or install the plugin through the WordPress plugins screen directly.
- Activate the plugin through the ‘Plugins’ screen in WordPress
To avoid conflicts that could break the editor experience, we opted to make the buttons interactive only on the published page, that is, outside the editor. This is valid for all the buttons, except for the Skip to link.
This plugin uses a strategy of updating the HTML root font-size only. This means that your fonts will only respond to changes if they are set in CSS relative units, such as
rem. Other plugins achieve scaling by an «opinionated» strategy of setting different font sizes to different elements in the inner HTML tags. While we would recommend you to work with relative units, we also believe it is valid to discuss that…
This is a valid discussion as nowadays, each Browser dedicated Zoom feature can handle scaling much better, no matter which CSS unit you are using. Often, if your site has decent mobile responsiveness, its layout will be nice in a Browser-zoomed scenario. However, one can argue that the fact that everything is scaled (including images) pollutes much of the relevant, readable content. In the end, it is a topic that we are not 100% sure about and would love to find more research related to it.
How do I set my skip link to a specific part of my site?
Skip links should use HTML anchor navigation, which is done via IDs. If the ID is not set in the code, you can configure it via a block. To set an anchor to a search bar, for example, select its block in the site editor and scroll to the Advanced section in the block settings tab. Most blocks have an area there to define an anchor. You can then define it as
search-bar-areaand then type
#search-bar-areaas your link in the button block settings.
Internally, the Skip to link button is an anchor (
<a>) tag, as its role is related to navigation. The other ones are actual
<button>tags as they perform actions and not as linking. You may use the block formatting and settings to make them similar to each other.
How are my preferences stored?
The plugin keeps track of font-size and contrast toggle state preferences across pages using sessionStorage. Make sure to warn your users if you feel that can be sensible.
Originally, we planned to have a simple feature to add
accesskeyto each button. After reading this, we gave up.
Can I invert the color of an image in High Contrast mode?
Yes! If you have an image like a monochromatic logo that would make sense to be inverted, add the class
a11y-invert-on-contrast-modeto it so it can be inverted.
Det er ingen omtaler av denne utvidelsen.
Bidragsytere og utviklere
“A11y Buttons” er programvare med åpen kildekode. Følgende personer har bidratt til denne utvidelsen.Bidragsytere
“A11y Buttons” har blitt oversatt til 1 språk. Takk til oversetterne for deres bidrag.
Oversett “A11y Buttons” til ditt språk.
Interessert i utvikling?
Bla gjennom koden, sjekk ut SVN-repositoriet, eller abonner på utviklingsloggen med RSS.
- Adds «Readable font» button with Atkinson Hyperlegible Font;
- Adds class
a11y-invert-on-contrast-modeto images and figures that you wish to be have color inverted on contrast mode.
- Fixes contrast mode css path;
- Proper cursor when hovering buttons;
- Better build workflow;
- Constrast mode css only loaded when needed;
- Initial – quite experimental – release, featuring contrast toggle, font size tweak and skip to link buttons.