Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
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.
>> The example page that we've been working on has a quotation from the Mayor of Wardscott on it. The proper HTML element for a quotation is the blockquote element. Since the default appearance of a blockquote is indented, it quickly became abused by web designers as a way to easily indent a block of text. Using a semantic element for presentational purposes in this way violates the concept of semantic markup. If we reserve the use of blockquotes for text that is truly a quotation, web devices can convey that information to their users.
If you're following along with the exercise files, open the file visitors.html from the 04_09 folder of the chapter four exercise files. In design view, scroll down to see the entire quote. It's the second paragraph on the page. Highlight over all of its text then go to the insert menu. Scroll down and select HTML. From that menu, select text objects. Finally, in this last menu, select blockquote.
As you can see, the text is now indented on both sides. As with the other elements that we've been working with, we can change this style to suit our design. Click on the new CSS rule button at the bottom of the CSS styles panel. Click on the tag option by selector type. From the Tag Select menu, choose blockquote. Keep this document only selected by the define in option and click okay. Let's make our quoted text bold. So select the Weight menu and choose bold.
Let's also change the font. On the Font menu at the top of the dialogue box, click on the arrow and scroll down and select Georgia, Times New Roman, Times Serif. As one other option, let's change the line height. Click on the line height box and type 1.8. Click on the arrow of the Value menu next to that box and scroll down to the bottom to select multiple. This will ensure that our line height value has no unit set so that it will work with multiple font sizes.
Click okay. You can see that the indented style of the blockquote still remains. We didn't override this in our CSS rule. We simply added more rules to it. We changed the font family, the weight and the line height. Another option you have with blockquotes is to add an attribute that specifies where the quotation came from. This is the cite attribute and its value is always a URL. This particular doesn't come from any other page, but let's look at how you would add the cite attribute to quotations that are from another source.
Before we can assign a cite attribute to the blockquote, we need to make sure that we have the entire blockquote tag selected. Look in the tag selector bar at the bottom of the document window. The tag that is currently highlighted is the P tag. This text was previously marked up as a paragraph. When we added the blockquote, it simply wrapped around that paragraph. This is perfectly valid HTML. You can have many paragraphs within a single blockquote. So we don't need to remove that paragraph, but do click on the tag immediately before it, the blockquote tag. With the entire blockquote element now selected, go to the tag inspector panel, click the arrow beside its name to open that panel.
This panel allows you to easily add attributes that are available for the selected HTML element. Click the plus sign by the general label. The only attribute listed is cite, because this is the only blockquote related attribute that exists. Click in the box next to cite. A text field will appear where you can type in a URL to another page on the web. Beside this text field are icons that allow you to either point or browse to a file that's on your local system as the source of the blockquote.
Again, since this quotation did not come from another source, we don't need to set anything here. But this is yet another piece of information that web devices can make available to their users. For instance, when JAWS encounters a blockquote, it announces that it is a blockquote and then says where the citation is from if you do set a cite attribute. Go ahead and close the tag inspector. So, we've seen that the blockquote element carries a lot of information that can be conveyed to difference devices and to different users. It shouldn't be used for purely presentational formatting, but instead only when there is quoted text that needs to be indicated.
Next we'll talk about how to add further information to your page using HTML lists.
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.