W3CWeb Accessibility Initiative Home

Apply user style sheets

On this page: Test 1 | References | About these tests

Nearby: More HTML 4.01 Tests | UAAG 1.0 Test Suite

UAAG 1.0 Requirement

Checkpoint 4.14 Choose style sheets (Priority 1 )
Provision 2 : Allow the user to choose from and apply at least one user style sheet.

Test 1 :

Procedure

  1. Override the author preferred style sheet--titled "Author Preferred"--by choosing and applying a user provided style sheet.
  2. When conducting this test, the user can use the linked test user style sheet, or the user can provide their own style sheet.

Run test

When using the author preferred style sheet, the text in this paragraph should be black with a white background. The user supplied style sheet should be able to cause this text to be rendered using different text and background colors. When using the test user style sheet linked below, the text in this paragraph should be white with a black background.

When using the author preferred style sheet, the text in this paragraph should be green with a white background. The user supplied style sheet should be able to cause this text to be rendered using different text and background colors. When using the test user style sheet linked below, the text in this paragraph should be white with a green background.

When using the author preferred style sheet, the text in this paragraph should be red with a white background. The user supplied style sheet should be able to cause this text to be rendered using different text and background colors. When using the test user style sheet linked below, the text in this paragraph should be white with a red background.

Link to test user style sheet

Expected results

  1. The user can choose and apply a user style sheet and change the styling of the test text.

Source code

(Code contained in the HTML document head)

<meta http-equiv="Content-Style-Type" content="text/css"/>
<link href="cp0414-preferred.css" title="Author Preferred" rel="stylesheet" type="text/css"/>

(Code contained in the HTML document body)

<p class="black">When using the author preferred style sheet, the text in this paragraph should be black with a white background. The user supplied style sheet should be able to cause this text to be rendered using different text and background colors. When using the test user style sheet linked below, the text in this paragraph should be white with a black background.</p>
<p class="green">When using the author preferred style sheet, the text in this paragraph should be green with a white background. The user supplied style sheet should be able to cause this text to be rendered using different text and background colors. When using the test user style sheet linked below, the text in this paragraph should be white with a green background.</p>
<p class="red">When using the author preferred style sheet, the text in this paragraph should be red with a white background. The user supplied style sheet should be able to cause this text to be rendered using different text and background colors. When using the test user style sheet linked below, the text in this paragraph should be white with a red background.</p>
<p><a href="cp0414-user.css">Link to test user style sheet</a></p>

References

  1. HTML 4.01 specification for External Style Sheets

About this test suite

This test is part of a test suite for the User Agent Accessibility Guidelines (UAAG) 1.0 . This work is conducted by the User Agent Accessibility Guidelines Working Group , which is part of W3C's Web Accessibility Initiative (WAI) . Please send comments on this test to w3c-wai-ua@w3.org ( public archive ).


Test created by:

Last modified: $Date: 2003/04/02 23:46:41 $ by $Author: jongund $