Re: errors in test result - table contains less than two td elements

Hi Edward,

Thanks for the report!
Please see inline.


On 08/31/2011 08:08 PM, Edward McGuire wrote:
> Regarding the document at: http://faithlesscompanions.com/
>
> The test threw: "Table contains less than two td elements
> A table with only one column is either the sign that the table is used:
> to represent a list of items
> to control the relative position of various sections of the page
> Both uses imply a layout based on tables. While most mobile devices
> support basic tables, they are rendered quite differently by different
> mobile browsers, and cannot be reliably used for layout. The table
> element should only be used - with care - to represent tabular data."
>
> Unfortunately this is factually incorrect. The table contains six td
> elements (not less than two)

Here, it's the wording of the message that is in cause. It should rather be something like "Table contains less than two td elements per row". In particular, the mobileOK Checker does not check the total number of td elements in the table.


> and has two columns (not one).

Indeed!

The message gets triggered because your table contains one header column ("th" elements) and one data column ("td" elements) so, technically speaking, only one "td" column. That said, there is no reason to treat "th" elements differently here, I agree it's a bug.

Since this weird behavior is aligned with what the mobileOK Basic Test 1.0 standard (on which the mobileOK Checker is based) suggests right now, I raised this point on the mailing-list of the Mobile Web Best Practices Working Group, proposing to add an erratum to the spec:
  http://lists.w3.org/Archives/Public/public-bpwg/2011Sep/0000.html

I will fix the mobileOK Checker once the erratum is approved.

Thanks again for raising this!
Francois.



>
> <table id="members">
> <tr>  <th>  <img class="mug" src="mug-cathy.jpg" alt="">  <td>
> <strong>Cathy Smith</strong>  <br>
>  vocals, keyboard, bass guitar
> <tr>  <th>  <img class="mug" src="mug-kevin.jpg" alt="">  <td>
> <strong>Kevin Smith</strong>  <br>
>  vocals, guitar, mandolin, fiddle, banjo
> <tr>  <th>  <img class="mug" src="mug-scott.jpg" alt="">  <td>
> <strong>Scott Williams</strong>  <br>
>  vocals, guitar, bass guitar
> <tr>  <th>  <img class="mug" src="mug-jay.jpg" alt="">  <td>  <strong>Jay
> Purrington</strong>  <br>
>  vocals, guitar
> <tr>  <th>  <img class="mug" src="mug-edward.jpg" alt="">  <td>
> <strong>Edward McGuire</strong>  <br>
>  vocals, drums, guitar, banjo
> <tr>  <th>  <img class="mug" src="mug-damon.jpg" alt="">  <td>
> <strong>Damon Barnard</strong>  <br>
>  audio engineer
> </table>  <!-- members -->
>
> The test was, however, very good at pointing out other ways that the
> table content will be problematic on some mobile devices, and it made
> good suggestions for resolving those problems.
>
> Cheers,
>
> MetaEd
>
>
>

Received on Friday, 2 September 2011 10:26:42 UTC