Warning:
This wiki has been archived and is now read-only.
SC2-4-2-title
This test belongs to 2.4.2 Page Titled
Status
Contents
Description
This test checks that the page title (the <title> element in the <head> section of a webpage)
- Exists.
- Is not empty.
- Identifies the role or content of the web page.
Background
- G88: Providing descriptive titles for Web pages
- H25: Providing a title using the title element
- F25: Failure of Success Criterion 2.4.2 due to the title of a Web page not identifying the contents
Assumptions
- Technique ARIA 1 is not considered for this test, although it was added in a recent update of the Understanding WCAG 2.0 document.
- If there are more than one
<title>elements this test will throw an error.
Test properties
| Property | Possible values |
|---|---|
| Test name | Page Title |
| Test requirement | 2.4.2 Page Titled |
| Test mode | semiAuto |
| Required expertise and skills | no prior knowledge |
| Additional expertise and skills | |
| Test environment | HTML source or DOM |
| Test subject | single web page |
Test procedure
Selector
earl:automatic<head>
Step 1
earl:automaticCheck that there is a <title> element in the <head> section of the html document.
if no,
return
| Property | Value |
|---|---|
| TestCase | SC2-4-2-title |
| Identifier | SC2-4-2-title-fail1 |
| Outcome | failed |
| ErrorMessage | Missing title element |
| Pointer | position |
| Info |
if yes, continue with step 2
Step 2
earl:automaticCheck for multiple title elements in head section of page. if yes, return
| Property | Value |
|---|---|
| TestCase | SC2-4-2-title |
| Identifier | SC2-4-2-title-fail2 |
| Outcome | failed |
| ErrorMessage | multiple title elements in head section. |
| Pointer | position |
| Info |
if no, continue with step 3
Step 3
earl:automaticCheck if page title is empty or contains only white space.
if yes, return
| Property | Value |
|---|---|
| TestCase | SC2-4-2-title |
| Identifier | SC2-4-2-title-fail2 |
| Outcome | failed |
| ErrorMessage | Page title is empty. |
| Pointer | position |
| Info |
if no, continue with step 4
Step 4
earl:automaticCheck if the title is a filename or a URL:
- Check if the URL of the page is used as the page title.
- Check if page title ends with a "." followed by a known file extension.
if yes, return
| Property | Value |
|---|---|
| TestCase | SC2-4-2-title |
| Identifier | SC2-4-2-title-fail4 |
| Outcome | failed |
| ErrorMessage | filename or URL used as webpage title. |
| Pointer | position |
| Info |
if no, continue with step 5
Step 5
earl:manualPrompt user to look at the title and content of the page.
User input question
Item presented to the user: Web page (with the title presented in a separate textbox, title does not always show up on mobile devices).
Question: Does the webpage title identify the content or purpose of this webpage?
Answer options: yes/no.
Help text: A page title should describe the content or purpose of the webpage.
A good web page title consists of two or 3 parts, usually separated by a-or a
|:
- A descriptive page title for the page itself.
- (optional) If the web page is a part of a section of the website, include the section name.
- The website name or domain name.
The web page title usually comes first, but any order of these is acceptable.
Repair suggestion: What would you suggest as a suitable title for this page?
Properties of the test step:
- context-sensitive = yes
- user interaction (with the web content) required = no
if no, return
| Property | Value |
|---|---|
| TestCase | SC2-4-2-title |
| Identifier | SC2-4-2-title-fail5 |
| Outcome | failed |
| ErrorMessage | page title does not identify the webpage. |
| Pointer | position |
| Info |
if yes, return
| Property | Value |
|---|---|
| TestCase | SC2-4-2-title |
| Identifier | SC2-4-2-title-pass1 |
| Outcome | passed |
| Pointer | position |
| Info |