Dynamic Style Configuration for Accessibility
These web pages demonstrate basic accessibility scripting.
When the page first loads, the system tries to read the temporary cookie to find the user preference. If there is one, it sets the style. If there is no cookie, then it uses the default style. This is handled by the onLoad="loadStyle();" statement in the body tag.
You can find information about the relevant EU regulation here:
- The EU Internet Handbook page about cookies.
There are three stylesheets:
- used if no preference is set: default
- used for a dyslexic preference: pastel
- used for a high visibility preference: highcontrast
By changing the actual style definitions in these style sheets you can change the appearance of the page for each of the accessibility preferences.
You also need to set up appropriate class and ID tags in your pages to ensure that the styles have the correct elements to which to apply.
You could replace the images used in the accessibility toolbar to more closely reflect the actual style choices you make in your style sheets.