1.11 Add titles to frames

WAI checkpoint 12.1

Full WAI text: "Title each frame to facilitate frame identification and navigation."

Frames allow the designer to break a web page into different pieces, each containing a different HTML file. Frames are often used is to break the page into two sections - one containing information which does not change as the user travels through the site and the other presents more dynamic information. A typical example is where the main navigation for a site is presented in a frame on the left side of the page, while content is presented in another frame on the right.

In this case, the navigation links are held in one HTML file on the left of the page while the content is held in another HTML file, which is called up depending on the link selected from the left frame. Clicking a link on the left essentially causes a new page to open in the right hand side of the browser window.

Each frame should have a title, even though this is not displayed visually.

Rationale

Users of older browsers or screen readers have difficulty in navigating web pages with frames. A user who can visually scan the page to determine the relationship of the page elements might not even notice if frames are used and will easily envisage the page structure but users who can't see the entire page don't have this ability.

For example, if a screen reader user opens a page with frames, they are presented with a list of the frames that make up the page. If the frames don't have titles, the user is presented with a list of file names, which have no meaning, e.g. -Frame: a'. The lack of useful information about the contents of the frame forces the user to open each frame, one by one, review their contents and figure out how it relates to the other frames on the page. This is frustrating and time consuming.

Directions and Techniques

Do not use frames purely for presentation purposes

Frames can offer benefits from a functional point of view but if the only reason you have for using them is purely aesthetic, then it is best not to use them. Most of the accessibility problems caused by the use of frames arise because they are a structural element, inappropriately used for visual layout.

Use the "title" attribute to name frames

When you code the HTML for frames, ensure that the "'title" attribute is used to provide a name for each frame. Treat frame titles or names like link titles and ensure that they have meaningful names which provide users with a good idea about the content of the frame, e.g. "main site navigation" is a better name than "nav". See WAI recommended techniques for using the "title" attribute to name frames

How you could check for this:

There are no specific test methods recommended for this guideline.

- View WAI checkpoint 12.1