Sunday, August 22, 2010

Changing style sheets and accessability

I have been getting stimulating ideas about web design from the many articles posted in Google Reader and yesterday came across a whole series of articles on CSS which gave me isnight into how I have discovered on my own many of the principles of accessability design and in particluar the use of alternative style sheets and even no style at all as an accommodation to sight impaired readers. The principle behind this is one I know well from my experiments with XML and XSLT as an alternative to HTML and CSS. It is to separate content from style as much as possible and to make the content semantically simple. Although the work I have read mostly discusses current standards in markup, HTML4 and XHTML, it is clear that HTML5 offers some of the same advantages through semantic control of content, It was this that drove me to consider XML as a markup. I could have used a CSS document to style the XML, but I really did need to transformit it, which was why I had to dive into XSLT, which is not trivial. It turns out that the web for moble and a diverse range of devices is equivalent to the needs of disabled people to some extant.

Alternative Stylesheets

The Zen Garden site for CSS is a wonderful demonstration of what can be done to the same content with different CSS stylesheets. This page has multiple likes to two style sheets, one is the default which is a lightblue background with navy text. The alternative is the Twilight style, no relation to the current movie. It is white text on a dark blue gradient image. I now know that I can do gradients direcly in the HTML5 canvass, removing the need to create a background image. The fly in the ointment here is that not all browsers allow you to switch stylesheets. The one I am using here, Firefox 3.0 does, but others don't, such as Safari. I couldn't find a hook in Google Chrome, but as I know it supports on the fly changes to style in HTML5, I find it hard to believe that it can't load one style sheet and then another at user's request. It just isn't obvious how you do it. There are code workarounds for browsers that don't switch style sheets. They are javascript or PHP programs you have to incude in your pages.

I like BIG Fonts

I sound like Sir Mix-a-Lot :-) but I am getting used to using the zoom hooks, usually C-plus-sign, in Linux. Emacs doesn't honor this convention, it does allow you set set the font size, but it is tucked away in Options->Set-default-font and I'd have to add some elisp to my .emacsrc file to make it persist. Maybe I should file a bug against GNU-emacs on this.

The need for accmodatations in an evolving disability appears very gradually in the case of having a cataract. My acuity has been deteoriating and I discovered that I realy do not only need a big font, like 18pt, to be able to improve my typing, but now more than ever. I used to be able to get away with the default sizes, thinking I could see typos, but now I know that I've been kidding myself, and I just changed the default font size in emacs to be BIG and I still gravitate back toward emacs even after trying all the newer editors. It isn't that emacs is perfect, or that the way it is configured is not in someways annoying it is that some of the power features like regular expression search and replace are hard to give up.

Free Web Hosting