Accessibilty for content providers - coding standards

This section isn’t going to set many normal pulses racing. Thankfully once you’re in the swing of things you’re only going to need to remember to validate your pages occasionally. You just need to be aware of the options in your editor that produce incorrect code and the perils of casually pasting in content from other programs.
The relevant main checkpoints from the Web Content Accessibility Guidelines (WCAG) are:

3.2 Create documents that validate to published formal grammars.

11.2 Avoid deprecated features of W3C technologies.

Both of them are Priority 2, so are required to meet the Double-A standard.

You’ll probably get to hear much more about web standards over the course of your Internet life. The purpose here is to make use of one of the basic tenets of the standards evangelists - more people can see and use more websites if we all use common points of reference. The second checkpoint is making sure that you keep up to date - usually before an HTML/XHTML element or attribute is removed from the standard it is marked as being deprecated so that everyone has time to make adjustments if they are using it.

How to validate

You can check whether your page using the HTML validator provided by the World Wide Web Consortium (W3C). If its content that is publicly available then you can enter the web address, otherwise view the HTML code for your complete page and paste that into the ‘Direct Input’ box. You will need to take the latter option if a user has to be logged in before seeing the content - otherwise the validator will only see the login form and check that.

You will get one of three results - yes, tentative yes and no. The ‘tentative yes’ will only appear if there is some information missing in the template for your page, as the validator needs to have the type of HTML/XHTML specified and also the character set. So if you see that then it’s an issue for your web team.

Resolving the problems

A ‘no’ from the validator means that there is something wrong with your page - that might be the content you’ve created or the template that its using. The best way to check this is to try to validate a page with as minimal content on it as you can muster. If you still have an invalid page then you will need to get your web team to look at the template. For the interim they might also be able to cook up a very simple web form that can generate a page using the code from the WYSIWYG editor and a minimal template that does validate. At least that will enable you to check if your part of the page has problems or not.

Making sense of the error messages isn’t easy unless you understand HTML - and sometimes they take some fathoming out even if you do. There are three possible circumstances that could be causing your problem:

  • you’re entering the text into the editor and styling it using the options available - in that case you (or your web team) need to work out which piece of functionality is creating the invalid code, and then avoid using it (or have the web team remove it)
  • you’re typing in HTML code in the editor - this requires some training/support and then you do need to be precise, HTML is a computer language and they can be very unforgiving if you don’t pay attention to the detail; or you get your web team to extend the functionality of your editor so that you don’t have to think about these things (after all that’s why it’s there in the first place)
  • you’re pasting content from other applications such as Word or an email - what’s happening here is that the editor is trying to retain the styling and not creating the proper HTML; the ways around this are either to find if your editor has a ‘Paste from Word’ or ‘Clean Word’ option and use that, or paste the text into a basic editing program which has no styling options (like Notepad) and then copy & paste from there

Specialist markup

You’re highly unlikely to need to do anything about the final checkpoint here:

3.1 When an appropriate markup language exists, use markup rather than images to convey information.

Basically there are some alternative technologies for handling the specialist layout needs of complex scientific and mathematical formulae. If you’re working within that sector then you must use them rather than resort to using images. Otherwise you can ignore this one.

Summary

  • Make sure that your pages validate
  • Avoid/remove options in the editor that create invalid code
  • Look for training/support if you are having to enter HTML code yourself, and pay attention to the detail when you are typing it in
  • Be careful when pasting content from other programs, if there isn’t an option to paste/clean content from Word in your editor then use a simple text program (like Notepad) as a staging point to remove any text formatting
  • If you’re working with complex scientific or mathematical formulae then there are specialist technologies you should use to include them in your web page (e.g. MathML)

Technorati editors, web-accessibility, WYSIWYG editors

One Response to “Accessibilty for content providers - coding standards”

  1. Paul Topping Says:

    Speaking of specialist technologies for math, readers should check out our extensive web content on this subject:

    http://www.dessci.com/accessibility

    Paul Topping
    Design Science, Inc.

Leave a Reply