A basic checklist for creating standards compliant websites.
- Markup should be semantic, well formed and generally valid.
- Aside from vendor prefixes and IE specific hacks, CSS should be valid
- Ensure a suitable contrast between background and foreground colours
- Content prints well or a print style sheet is provided
- All images have an alt attribute. Empty or otherwise
- Test your site with JavaScript disabled
- HTML reliant on JavaScript should be added as an enhancement. i.e added to the page using js.
- Don’t use inline styling
- Provide suitable fallback content for <object />,<embed />
- Provide skiplinks - link to content, link to top etc
- Avoid styling elements using IDs. use classes instead
- Class names should be descriptive of the content and not related to presentation
- Ensure CSS is structured in a modular way for easy reuse
- Avoiding adding unnecessary descendent selectors. e.g. .content .componentName .list li is less efficient than .componentName li
- Avoid attaching tags to CSS classes e.g ul.nav is less efficient than .nav
- Avoid adding more widths than necessary. Components shouldn’t need a width as they will get this from their column container.
- Use width: auto over width: 100% when resetting widths of block level elements.
- W3C CSS Validation Service
- CSS validator
- Accessibility - Cynthia Says Portal
- Accessibility - WAVE