Monday 22nd of January 2018 11:19:55 AM

CSS Style Guide

XHTML: Accessibility Tips

The library is committed to serving the entire public, and that means striving to ensure that all pages of our site are accessible to the greatest possible number of people and devices (including audio browsers, Braille readers, and other specialized browsing environments).

In addition, accessibility is now U.S. law for all government and publicly funded sites.

Education and Compliance

The following links can help you develop pages that comply with accessibility laws and guidelines:

WAI Accessibility Guidelines
These guidelines offer compliance tips, and outline various levels of compliance.
Bobby Accessibility Validator
The Center for Applied Special Technology has created this online tool that analyzes web page accessibility based on the W3C guidelines.

Accessibility and Web Standards

In a perfect world, the library’s website would be authored in XHTML 1.0 Strict, using absolutely no deprecated HTML “design” elements. Visual design would be handled via Cascading Style Sheets exclusively.

This strict separation of structure (XHTML) from style (CSS) would enable us to comply with the W3C's Priority One rating for User Agent Accessibility Guidelines 1.0, and would also vastly simplify the design, development, and maintenance of our site.

With such an approach, our site could look great in a standards–compliant browser, and yet remain accessible to virtually any known browser or Internet device.

The Bad News

Unfortunately, many web browsers used by our audience are not sufficiently CSS-compliant - over one third still use some version of Netscape 4.x. Happily, NYPL has upgraded our onsite PCs to Internet Explorer 5.5.

The Transitional Solution

In order to design sites that achieve at least a minimum of accessibility and that work well in Netscape 4, our pages must:

In addition, all XHTML and Style Sheets must validate, a simple process described on the very next page. »

« XHTML Section Index | XHTML Validation »

defined colors, but there are 16 colors that are suggested by thespecification and that all major browsers recognize:

If these seem like odd color names, it's because -- well,they are. In my opinion, anyway. So where do they come from? Thesecolors were taken from the original sixteen basicWindowsVGA colors, andbrowsers are supposed to generate colors that at least come close to

Sometimes,the values you're entering for margin get a little repetitive:

You don't have to keep typing in pairs of numbers like this, though. Instead of the preceding markup, try this:

These two values are enough to take the place of four. But how?

CSS defines a few steps to accommodate fewer than four values for margin: anyway. (Thanks to Howard Marvel for discovering and sharing this trick.)

11.2.9. Drop Caps With and Without :first-letter

Drop caps are a very common, and much-requested, typographical effect. A typical drop cap looks like the illustration in Figure 11-22.

<TD CLASS="links"><A HREF="links.html">Other Links</A></TD> <TD CLASS="write"><A HREF="write.html">Contact Me</A></TD> </TR> </TABLE>

Then, on each page, we simply write an appropriate style. If the highlighted link should have a yellow background, then on the "Other Links" page, we would add this to the style sheet, leading to the result depicted in Figure 11-20:

TD.links {background: yellow;}