E-mail List Archives

Re: Interesting cause: http://contrastrebellion.com


From: YOUNGV5@nationwide.com
Date: Jul 28, 2011 5:06PM

What I am having trouble with is understanding the present day
accessibility reason(s) for recommending style sheets over in-line styles;
such as the following recommendation from the W3C:


In-line styles have not seemed to have adverse effects in the assistive
technology I use such as ZoomText or Internet Explorer's native user style
sheet switcher. It would be nice to have some documented cases on where
in-line styles have been an issue for assistive technology. Needless to
say, I am a big fan of using style sheets. I like to steer clear of any
potential accessibility problems, which in-styles could present today and
in the future.

@YUCCA - I'd like a little more explanation from you on the following

Inline styles have their problems, but how would it make a difference to
set, say, some properties for a single paragraph using <p style="...">
versus using <p id="foo"> and setting the styles for #foo in a style
element or in an external stylesheet?

Did you mean what difference would it make from an accessibility

If not, the difference to me would be the following:

1. Code maintainability becomes much easier when all styles are in
external style sheets.

2. Adding dynamic JavaScript behavior (especially when using a library
such as jQuery) typically makes life easier when using classes/ids placed
in external style sheets.

3. When adding/overriding existing styles, doing so is easier when all
styles are in external style sheets.

4. External style sheets keep your HTML squeaky clean.

5. External style sheets allow for reusable styles for often faster
download speeds.

6. No potential accessibility issues.

Vincent Young
User Experience, Web Accessibility Specialist
Nationwide Corporate Marketing
o | 614·677·5094
c | 614·607·3400

"Jukka K. Korpela" < <EMAIL REMOVED> >
07/28/2011 04:23 PM
Re: [WebAIM] Interesting cause: http://contrastrebellion.com
Sent by:

28.07.2011 22:46, John Foliot wrote:

>> While most user style-sheets will be highly generic, there could exist
>> cases where a more defined style-sheet that was site specific (think
>> intranet for example) could be developed for specific users. Having all
>> those style declarations inside one document (rather than having to
>> hunt out and address inline styles) benefits the end user

That's a rather rare case, and not particularly significant even in
those rare cases. It's generally the overall complexity of style sheets
that makes it difficult to design a user style sheet that works with a
page (author) style sheet. People can write highly confusing and complex
style sheets in style elements or external stylesheets. Compared to
that, inline styles are mild-mannered animals.

> Also, the Cascade effect come into play here: inline declarations always
> over-rule embedded and linked styles,

Only when other things are equal, and in this discussion they aren't.

> Therefore user stylesheets could not over-rule inline
> styles unless you applied the !important declaration as well,

User stylesheets cannot overrule _any_ page (author) stylesheets without
!important. Inline declarations have high specificity, but that doesn't
matter when considering user vs. page stylesheets. Page stylesheet
always wins, unless there's !important. Specificity doesn't affect this.

Yucca, http://www.cs.tut.fi/~jkorpela/