Description
Is your feature request related to a problem? Please describe. The idea is to help using web (built with jss), by disabled or partially-disabled end-users.
I'd like to suggest a feature request in form of plugin enabling basic a11y jss transformations.
Rules should transform jss to be as close as possible to WCAG 2.1 guideline. Mainly the plugin should support at least features like:
font-sizescaling based on chosen setting by the end-user - https://github.com/iamfrntdv/postcss-increase-text-sizes- high-contrast mode - like in this postcss plugin: https://github.com/shiwaforce/postcss-high-contrast
- a nice feature could be logging warnings if we detect too little difference with background and font color like in css
color: #fff; background: #fefefe;for the same selector.
Any other ideas for improvements are warmly welcome.
Describe the solution you'd like When using the plugin, all CSS nodes should be transformed, based on options and end-user interactions. Options should be passed to the plugin with API like this:
jss.use(jssA11yPlugin({showWarnings: true, ...someOtherOptions});
jssA11yPlugin.scaleFontSize(0.5);
jssA11yPlugin.resetFontSize();
jssA11yPlugin.applyHighContrast();
jssA11yPlugin.resetHighContrast();
Some more methods should be available to rebuild styles and reattatch stylesheets. Same goes for exposing method for font scaling as well as contrast changing and interacting with other features. Above is just a draft-like proposal. There could be be some concerns for SRR, but I'm not sure. Performance is another thing for concerns.
Are you willing to implement it? Unfortunately, I don't have time to do it :( But wanted to make a point about a11y. Great work with jss! Using it lately a lot!