While not a solution in itself, if your theme has low contrast issues or small fonts, using this custom control to toggle high-contrast or large font modes can be useful.
All styles can be customized or extended within your theme directory, since default states for these tools may not be suitable for your site. The accessibility toolbar is based on the original written by Chris Rodriguez.
To customize high contrast styles, place a stylesheet called a11y-contrast
in your theme’s home directory. With a custom stylesheet, you are responsible for defining all styles used for high contrast. You can make a copy of the stylesheet from wp-accessibility/toolbar/css/a11y-contrast.css
for a starting place.
The large font styles add the class .fontsize
to your site’s body
element when active. Any styles you define in your theme or in the WordPress customizer at Appearance > Customize > Additional Styles
that use this class will take effect when activated. For example:
.fontsize h2 {
font-size: 4rem;
}
The above would simply set a size of 4rem for h2
headings when the fontsize toggle is activated.
The toolbar also supports a grayscale option for testing, but grayscale has no real-life application for users, and is not enabled for users.