/gist:ab0b07e1c8561b1d53ba Secret
Last active
December 23, 2015 02:19
Star
You must be signed in to star a gist
Corrections for Theme Unit Test data - Tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Current (2013-09-05) Theme Unit Test Data, as found in Post Markup, Page Markup, and Comment tests --> | |
<table> | |
<tbody> | |
<tr> | |
<th>Employee</th> | |
<th class="views">Salary</th> | |
<th></th> | |
</tr> | |
<tr class="odd"> | |
<td><a href="http://example.org/">John Doe</a></td> | |
<td>$1</td> | |
<td>Because that's all Steve Job' needed for a salary.</td> | |
</tr> | |
<tr class="even"> | |
<td><a href="http://example.org/">Jane Doe</a></td> | |
<td>$100K</td> | |
<td>For all the blogging he does.</td> | |
</tr> | |
<tr class="odd"> | |
<td><a href="http://example.org/">Fred Bloggs</a></td> | |
<td>$100M</td> | |
<td>Pictures are worth a thousand words, right? So Tom x 1,000.</td> | |
</tr> | |
<tr class="even"> | |
<td><a href="http://example.org/">Jane Bloggs</a></td> | |
<td>$100B</td> | |
<td>With hair like that?! Enough said...</td> | |
</tr> | |
</tbody> | |
</table> | |
<!-- More correct semantic markup --> | |
<table> | |
<thead> | |
<tr> | |
<th>Employee</th> | |
<th>Salary</th> | |
<th></th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<th><a href="http://example.org/">John Doe</a></th> | |
<td>$1</td> | |
<td>Because that's all Steve Jobs needed for a salary.</td> | |
</tr> | |
<tr> | |
<th><a href="http://example.org/">Jane Doe</a></th> | |
<td>$100K</td> | |
<td>For all the blogging she does.</td> | |
</tr> | |
<tr> | |
<th><a href="http://example.org/">Fred Bloggs</a></th> | |
<td>$100M</td> | |
<td>Pictures are worth a thousand words, right? So Jane x 1,000.</td> | |
</tr> | |
<tr> | |
<th><a href="http://example.org/">Jane Bloggs</a></th> | |
<td>$100B</td> | |
<td>With hair like that?! Enough said...</td> | |
</tr> | |
</tbody> | |
</table> | |
<!-- | |
Line 37, 43: thead element added in to markup the table head row. Standard semantic markup. | |
Line 40: Removed oddly named class of "views" - isn't an expected class, and doesn't seem | |
to match anything. | |
Line 45, 50, 55, 60: Removed odd and even classes. While these are WordPress-generated classes | |
for individual comments, I don't think it's realistic to expect styles to also cater | |
for alternate table rows as well, so including them in the unit test is redundant. | |
Line 46, 51, 56, 61: First cell in each row changed to th, since the data in the first column | |
is a heading for the rest of the row. Standard semantic markup, allowing a differentiation | |
between thead > tr > th and tbody > tr > th. | |
Also: | |
Line 48: Job' => Jobs | |
Line 53: he => she | |
Line 58: Tom => Jane | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had noticed issue this quite a few times, while coding the CSS part for my themes. Good Work (Y).