PDA

View Full Version : Accessibility


Phil_at _work
09-27-2002, 04:35 AM
Ok, the buzz word of the moment is Accessibilty of here in Aust. Gov Departments.

Question,

I have seen it done on this site http://www.section508.gov

There is a form at the top right that yiou can set default-font and font-size. Looking at the code it is posting to a .cfm file. Now Im wondering is this effect possible in JavaScript?

I'm keen on implementing the function on my site here, could someone help out with a base script for me to work off,

Im still trying to learn cookies and dynamic stylesheets. If some one could point me in the right direction Im sure I could figure it out from there.

jkd
09-27-2002, 04:48 AM
If your site relies on Javascript, then it really isn't accessible.

Accessibility is determined primarily by your markup, and on primarily the default rendering (i.e. does the font size scale appropriately so everyone can read it, is there enough contrast for people with poor vision, etc).
CSS allows some runtime rendering to be different than the page default, so you must be careful that your link :hover's must be ok for example.

Phil_at _work
09-27-2002, 04:54 AM
The site doesn't rely on JavaScript, but I would like to use these features if I could.

Basically the site as it stands now is Accessible, but it would be good, if I could add features such as the one I mentioned as an advanced feature set. Get away from the dull and bland. Im getting into CSS at the moment and have the fonts relative sizes, but I want to be able to change their size set by the user.

Accessiblity is also about giving people options.

Is it possible to acheive the effect I am after in JavaScript?

brothercake
09-27-2002, 01:00 PM
I did something similair at http://www.brothercake.com/preferences.php

All it does is compile a different template using PHP, depending on what options you choose. At its simplest level you can discriminate by writing style-tags dynamically.

Say for example, you have a variable called "baseFont" in which you store the user's choice of font-face. You can go

document.write('<style>');
document.write('p \{ font-family:'+baseFont+'\; \}');
document.write('</style>');

In your head template; storing the info in a cookie so it's transferrable from page to page

joh6nn
09-27-2002, 09:55 PM
you can get code for that, with a good explanation of what's going on, at www.alistapart.com . i'm pretty sure there's a link to it on the main page.

whammy
09-28-2002, 01:34 AM
FYI vision impaired people can increase the font size of everything on your webpage by holding down CTRL and scrolling with their mouse button (at least in IE, I haven't tested it in other browsers).

In some browsers, you can disable this with CSS by defining a fixed pixel size to the text... but if you use POINT (i.e. 10pt) it will still allow them to resize the text.

I hope that helps...

jkd
09-28-2002, 04:50 PM
Originally posted by whammy
FYI vision impaired people can increase the font size of everything on your webpage by holding down CTRL and scrolling with their mouse button (at least in IE, I haven't tested it in other browsers).

In some browsers, you can disable this with CSS by defining a fixed pixel size to the text... but if you use POINT (i.e. 10pt) it will still allow them to resize the text.

I hope that helps...

Without enough contrast, it doesn't matter how big the text is. The text zoom feature is present in IE and in Mozilla.

As for defining sizes in px's, and it not enlarging in IE with increased Text Size, this is a bug!. Even pixel-defined font sizes must be resized in an accessible web browser. Mozilla has no problem with this though :).