views:

92

answers:

4

Hi All,

I am new to style sheets and Section 508.I am trying to understand it.

As i understand, style sheets provide some specific set of details on how to display a web page. For example, it can mention color, font and size to be used for all elements/specific elements in a page.

One of the criteria in section 508 states that, we should not override user specific settings of font, color and contrast they may make at OS or browser level. In this case, how should we go about respecting this? The idea of having a style sheets is to have a unique, more impressive and usable style of our own. So we will have our own set of font, color etc., in our style sheets.

If this criteria is to be met, we should not override any font/color/contrast in our UI which is a bit contradictory to one of the ideas of using style sheets. Isnt it? So should we provide another style sheet which uses high-contrast details which is also our own set of fonts, colors etc., or provide an option to use our UI without style sheets? Please advice.

Thanks in advance.

+2  A: 

Style sheets themselves (or at least CSS) already provide a suitable mechanism for this: User style sheets. A user can set any styles within his user agent, which, if suffixed with the !important rule, override the author's definitions.

Furthermore, regarding fonts, authors can specify font families which are user-specified. Those are, among others, serif, sanf-serif and monospace.

You can also use the system colors to specify foreground and background colors of elements to ensure contrast, such as

background-color: Window;
color: WindowText;

This would ensure legibility and use of the system-defined colors.

Joey
THanks Johannes. So for user style sheets, should we provide an alternate high contrast one? Or the user who is using it will have their own?The second one is exactly the reason why i got confused. if we just take system settings and cant specify a set of our styles, which can come from lots of research and user experiences why to have a style :( ?
Aviator
You can provide multiple style sheets. User agents generally allow the user to pick a style, even though very few web sites make use of that. So you can include a high-contrast one. But as I said, most sites don't bother offering multiple styles so users who need it probably have user styles set accordingly anyway. Also browsers do this automatically if the system itself already uses a HC color scheme. You can easily try this out on Windows, for example. Stack Overflow looks fun that way :-)
Joey
Thanks Johannes. If we use a specific style, the system HC settings are not taken by a web page. :( Atleast in my case. thats where i started getting confused! But i think i can provide alternate sheets with system default settings might be good!
Aviator
+1  A: 

What language are you using? Some languages allow you to change the styles on an object programatically; others you'll have to use javascript. Which you can't rely on for 508c compliance.

tsilb
Java in server side with UI part handled by set of JSP (HTML finally while sending response), JS and CSS.
Aviator
+1  A: 

They're really more guidelines than anything else. If your design works well no matter what the default font size or whatever is, then feel free to keep it at that. If not, no biggie. There's whole-page zooming, screen inversion, and if all else fails, turning off CSS (or CSS overriding), if someone really dislikes your design.

The most important part to remember is that your user can have defaults that are different from what you're used to. If you change a foreground color, you should also change the background color, and vice versa, since your user might have set them to different colors than you expect them to be. If you set the font size of text in one place, you should set the font size of text everywhere (preferably in body or html) And in general, when you change one setting, to make sure it could never conflict to your users' defaults, overriding those defaults if necessary.

Zarel
Thanks! Do you think providing a way to work with UI without any style sheets will make it more worthy? Or make the existing styles acccessible with different sets of css etc., will be fine?
Aviator
Well, I mean, your site should function correctly without CSS. But you don't need to provide a mechanism to remove the CSS - the user's browser can do that if the user wants to.
Zarel
Basically: If there's something a user wants to change about your website, he will change it himself (the easiest way to see this in action is to use Opera's user-styles feature). All you have to do is design your site to work well even when parts of it are overridden, which is a simple matter of following the guidelines in my answer.
Zarel
thanks a lot Zarel!
Aviator
+1  A: 

Stylesheets actually help you to adhere to 508, WCAG and (in the UK) the disibility discriminations act. It is also worth noting that in many cases they are much stronger than just guidelines, they are law.

You use your stylesheet to make your page look ace, and if a user has a special need, they can choose to "switch off" stylesheets, or even replace them with their own.

With this in mind, you can set whatever values you like in your stylesheet (see note below) but also check that your website works when you switch it off completely (you can test it by taking out the reference to your stylesheet, or if you are using Firefox, with the Web Developer Toolbar).

Note: When I say "whatever values you like", you should still be trying to ensure that the values you select give at least 80% contrast - i.e. not white text on a yellow background etc

Sohnee
Aviator