Quick Tips for Website Code
Developing Global Code for Accessibility
The code that controls your full website has a number of areas where it can be developed or optimized to provide a more accessible experience for users. Below are a few of the key areas to consider when revising or developing global code for your site.
Validated HTML
Valid HTML is the first part of a compliant site. Be sure that your site elements have complete start and end tags, and that they are nested properly (according to specifications). In addition, elements shouldn’t contain duplicate attributes. And any IDs need to be unique to avoid confusion or a lack of clarity.
Language attribute
Screen readers rely on the language attribute to correctly and effectively pronounce content. Be sure to include this on the HTML element.
Page titles
Being the first item encountered by assistive technology (e.g. screen readers), page titles are critical to helping users know whether they are on the correct page or site they are seeking.
Zoom/increase text size
Be sure that viewport zoom is not disabled; this way, users who need to can increase the size of the text on your page or site whenever it is necessary.
Session timeouts
Avoid implementing session timeouts altogether whenever possible. If necessary, however, make sure that the amount of time is clearly communicated and that you give users ample notice before the page times out.
Landmark elements
Clearly indicate important regions of content by assigning name, role, and value to any critical areas, including navigation, primary page content, etc.
There are a number of other areas where your site’s accessibility can be improved through global code considerations, but these are some of the primary areas to review and plan for as you develop or revise your site.