Start learning with our library of video tutorials taught by experts. Get started
Viewed by members. in countries. members currently watching.
Accessibility on the web has been an issue for over a decade, and it remains a crucial--but often overlooked--element of web design. Instructor Zoe Gillenwater explains the concept of accessibility as it applies to the web, and describes how it affects the audience. She also covers how to set up accessibility testing, and how to apply accessibility principles to new and existing sites using standards-compliant markup and CSS. Exercise files accompany the tutorials.
>> There are three basic types of CSS layouts that Dreamweaver CS3 offers as part of its pre-made layouts: fixed width, elastic width and liquid width. We're going to start out by looking at a fixed width layout. Fixed width means that the overall width of the design is constrained to a particular pixel width that the designer has chosen. Although this type of layout is the least optimal in terms of accessibility, as we'll go over in detail later, it's also the easiest type of layout to build. So it's a good place to start our practice with CSS layout.
To create a new fixed width layout, go to the File menu, click on New, in the New Document dialogue box click on blank page in the left most column of the box. In the second column, select HTML. In the third column labeled Layout, choose the layout labeled Two column fixed left side bar header and footer. The image that appears in the fourth column gives you an idea of what this layout is going to look like.
The padlock icon on this image indicates that it's a fixed width layout. We next have to choose a document type for our page. We can choose between HTML 4.01 transitional and strict and various versions of XHTML. I'm going to choose HTML 4.01 Strict. Our next option is to choose where we want to add the CSS for the style. We can add it to the head of the page so that all of the rules will be listed out inside a style element in the head. We can add it to a file separate from the HTML page, which Dreamweaver will automatically attach to the page for you.
Or our third option is to link to an existing file, and we would only use this when we didn't want Dreamweaver to create any CSS but just create the structure of this page for us. Choose the Add to Head option. Even though on real sites it's best to keep all the styles in external style sheets, it's very helpful to keep the styles in the head while you're building the page for easy reference and not having to switch back and forth between multiple documents. Once you've finished editing the styles you can easily move them to an external style sheet. Now that we have all the settings correct, click on the Create button.
Dreamweaver creates a new page with placeholder content to help you visualize the page and how it's going to look. Each of the sections of the page is labeled with its purpose. The first DIV on the page is named header. The next DIV is named side bar one. The main content DIV is named, of course, main content. And if we scroll down to see the bottom of the page we can see our footer at the bottom. Let's preview this page in a browser so that we can see what a fixed width design looks and works like.
Go to the document tool bar and click on the globe icon to bring up the Preview in Browser menu. Select Preview in Firefox. We're prompted to save the page, so click Yes and save it to the Chapter 3 exercise folder. I'm going to name it fixed.html. Then click Save. Once it's saved you'll see the page in Firefox. Right now our browser window is maximized, but if I click the button to restore down its size, I can then resize the browser window to different widths and see how this affects the page.
So try making your browser window narrower and wider. The design stays centered, but it doesn't resize. Another thing that we can test is how the design will hold up when we change the text size. You can enlarge the text by holding down Ctrl and the plus key or Cmd and the plus key. Every time you hit that button combination the text will get bigger. To make the text smaller you can use the Ctrl and dash key or the Cmd and dash key.
Again, every time you hit these keys the text will get smaller. Once again, the width of the design did not change. The text reflowed, but the width stayed the same. Close the browser window now and go back to Dreamweaver. Let's look at the CSS that is making this page fixed in width. Open the CSS panel group and click on the CSS styles tab, then click the all button to reveal a list of all the styles in the document. You'll need to click the plus sign next to the style element. The second style listed is the one we want to look at.
I'm going to pull these other panels down so that we have more room to look at the CSS. All of the properties for this rule are shown in the CSS panel. You can see the width property is set and its value is set to 780 pixels. This is what is making the design fixed width. There's nothing in the markup that is doing it. If you wanted to customize one of Dreamweaver's fixed width layouts, this is where you would look to change the width. So it's pretty simple to create and customize a CSS layout in Dreamweaver CS3. But when we were looking at it in the browser we saw some accessibility problems.
The user cannot resize the design to make the text flow in a way that is easier for them to read. Another problem is that if a user has very large text, such as a vision impaired user, only a couple of words may fit on a line of text, which can make the flow of reading difficult. On the other hand, many people with dyslexia or tunnel vision would prefer a narrow design with shorter line length. But again, they are not able to resize the design to suit this. This doesn't mean that you should never use fixed width layouts. Remember, accessibility is a scale.
It's not an on or off characteristic. There are some types of sites that has content that are well suited to a fixed width layout, or it might be a requirement from your client. So if you feel you need to create a fixed width design, that's okay. Just be aware of its limitations. Next we'll look at a couple of layout types that are higher up on the accessibility scale.
There are currently no FAQs about Web Accessibility Principles.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.