XHTML 1.1 - Served as application/xhtml+xml
Inaccessible HTML Tags
Inaccessiblility
Here are a few (x)HTML elements that show the implications of Inaccessible HTML Tags:
Frames
Frames are used to divide the website into several independent parts, each consisting of a separate HTML page. There are many drawbacks to using frames:
- You confuse the visitor.
- One of the basic understandings of the web is that every page is represented by a unique URL. By breaking this understanding, you make it harder for visitors to understand the structure of the site.
- Frames cause problems for search engines.
- When a search engine indexes a site, it visites the main
default page. A frame based website has as it's main page
the frameset tags - not content!
- You'll need to provide links to all content pages via a site map.
- Visitors that come to the site from a search engine
will also encounter problems, since they are likely to
request a page that is missing important parts of the site,
like the navigation links.
- Some frame-dependant websites try to get around
this by using the file
robots.txtto tell search engines not to index sub pages. - JavaScript is sometimes used as well to send anyone who arrives at the site from a search engine to the default page.
- Both of these methods work, if your goal is to get loose your visitors.
- Some frame-dependant websites try to get around
this by using the file
- When a search engine indexes a site, it visites the main
default page. A frame based website has as it's main page
the frameset tags - not content!
- Frames break bookmarking.
- The majority of web browsers can't bookmark a page inside a frame based website. When you open the bookmark, you will go to the website's homepage.
- Printing becomes more difficult.
- Many visitors will have problems when trying to print documents. Many browsers require you to activate a frame by clicking on it before you can print it.
- Sending links through e-mail becomes difficult.
- Frames remove the ability to send links to a page inside the site. You can hack the page to make it work, but that adds complexity to the page's markup.
- Making the site accessible becomes more difficult.
- Visitors who aren't using a graphical web browser that supports frames run into problems. For this reason, accessibility guidelines advise against using frames.
Besides, you are making things harder on yourself. Frames are so 90's anyway!
Tables
Some designers tend to interpret "don't use tables for layout" as "don't use tables at all". That is not the idea. If what you're marking up is tabular data, it belongs in a table, so a table is what you should use. There are ways to build data tables, which are more logical and accessible.
Read more:
- A table, s´il vous plaît
- Links to articles describing how to build accessible tables.
- Tables for Tabular Data
- An article on how to use tables for tabular data.
Tables for web design layouts are so 90's anyway!
Forms
Forms are often marked-up in un-semantical ways, because the (X)HTML code isn't using the elements to make
forms accessible and easier to use. The elements <label>, <fieldset> and
<legend> are meant to be used.
Read more:
- Creating Accessible Forms
- A WebAIM article on accessible forms.
- Better Accessible Forms
- An article that goes through the basics of building better, more accessible forms.
JavaScript and cookies
Avoid depending on JavaScript. More people than you might think have JavaScript turned off in their browser, for security reasons, or to avoid pop-up windows. Also, users may have a browser that doesn't support JavaScript anyway. According to TheCounter.com, 6% of web users have no JavaScript. W3Schools.com reports 8%.
Most cases where JavaScript is being used, it is just fluff anyway, and doesn't actually benefit the visitor. Of course there are cases where JavaScript can be proved usefull. One example is validating form input.
You don't have to avoid using JavaScript. It does mean that you should nothave a website depend on JavaScript to work.
The same thing goes for cookies. Do not use cookies in a way that makes the web site stop working if the visitor doesn't accept them.
Back to topSo you see, website accessibility is something every web designer is responsible for.