Access 5.5.1.1

From Htmlpedia
Jump to: navigation, search

Access: [5.5.1.1]: <table> missing summary (Priority 3)

Cause:

Tables must include a "summary" attribute in the table element. The summary should describe the relationship among table cells and cells that span multiple columns and/or rows. It is also useful in describing how the information contained in the table relates to other information in the document.

Example:

Bad
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.5.1</title>
</head>
<body>
<table>
	<caption>This table has no summary</caption>

	<tr><td>1</td><td>2</td></tr>
	<tr><td>3</td><td>4</td></tr>

</table>
</body>
</html>

Solution:

Good
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>aert1.0/5.5.1</title>
</head>
<body>
<table summary="Summary">
	<caption>Caption</caption>

	<tr><td>1</td><td>2</td></tr>
	<tr><td>3</td><td>4</td></tr>

</table>
</body>
</html>

References: