W3C home > Mailing lists > Public > www-validator-cvs@w3.org > May 2014

[Bug 25575] Element th is missing one or more of the following attributes: role.

From: <bugzilla@jessica.w3.org>
Date: Wed, 07 May 2014 09:13:03 +0000
To: www-validator-cvs@w3.org
Message-ID: <bug-25575-169-tlNI9xzfUC@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25575

Michael[tm] Smith <mike@w3.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |mike@w3.org
         Resolution|---                         |WORKSFORME

--- Comment #1 from Michael[tm] Smith <mike@w3.org> ---
(In reply to Atte Backman from comment #0)
> With the following line validator throws incorrect error:
> 
> <th style="font-weight: normal; width: 0px;" class="sorting_asc"
> tabindex="0" aria-controls="transfer-wizard_search_results_from" rowspan="1"
> colspan="1" aria-sort="ascending" aria-label="Tilinumero: activate to sort
> column ascending">foobar</th>
> 
> Element th is missing one or more of the following attributes: role.
> 
> However, I believe role is not allowed in element th?

The current spec says that <th> can have any role value:

  http://www.w3.org/html/wg/drafts/html/master/tabular-data.html#the-th-element

But the spec only allows the aria-sort attribute for elements that have either
role=columnheader or role=rowheader. So you need to something like this:

<table role=grid>
<tr role=row>
<th role=columnheader style="font-weight: normal; width: 0px;"
class="sorting_asc" tabindex="0"
aria-controls="transfer-wizard_search_results_from" rowspan="1" colspan="1"
aria-sort="ascending" aria-label="Tilinumero: activate to sort column
ascending">foobar</th>
...

If that doesn't solve your problem, please feel free to re-open this bug.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 7 May 2014 09:13:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:56 UTC