<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25575</bug_id>
          
          <creation_ts>2014-05-06 10:25:27 +0000</creation_ts>
          <short_desc>Element th is missing one or more of the following attributes: role.</short_desc>
          <delta_ts>2017-06-16 18:57:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML Checker</product>
          <component>General</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Atte Backman">koodiapina</reporter>
          <assigned_to name="Michael[tm] Smith">mike+validator</assigned_to>
          <cc>craig</cc>
    
    <cc>david100</cc>
    
    <cc>mike</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105169</commentid>
    <comment_count>0</comment_count>
    <who name="Atte Backman">koodiapina</who>
    <bug_when>2014-05-06 10:25:27 +0000</bug_when>
    <thetext>With the following line validator throws incorrect error:

&lt;th style=&quot;font-weight: normal; width: 0px;&quot; class=&quot;sorting_asc&quot; tabindex=&quot;0&quot; aria-controls=&quot;transfer-wizard_search_results_from&quot; rowspan=&quot;1&quot; colspan=&quot;1&quot; aria-sort=&quot;ascending&quot; aria-label=&quot;Tilinumero: activate to sort column ascending&quot;&gt;foobar&lt;/th&gt;

Element th is missing one or more of the following attributes: role.

However, I believe role is not allowed in element th?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105289</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2014-05-07 09:13:03 +0000</bug_when>
    <thetext>(In reply to Atte Backman from comment #0)
&gt; With the following line validator throws incorrect error:
&gt; 
&gt; &lt;th style=&quot;font-weight: normal; width: 0px;&quot; class=&quot;sorting_asc&quot;
&gt; tabindex=&quot;0&quot; aria-controls=&quot;transfer-wizard_search_results_from&quot; rowspan=&quot;1&quot;
&gt; colspan=&quot;1&quot; aria-sort=&quot;ascending&quot; aria-label=&quot;Tilinumero: activate to sort
&gt; column ascending&quot;&gt;foobar&lt;/th&gt;
&gt; 
&gt; Element th is missing one or more of the following attributes: role.
&gt; 
&gt; However, I believe role is not allowed in element th?

The current spec says that &lt;th&gt; 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:

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

If that doesn&apos;t solve your problem, please feel free to re-open this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109162</commentid>
    <comment_count>2</comment_count>
    <who name="Craig Francis">craig</who>
    <bug_when>2014-07-22 13:12:02 +0000</bug_when>
    <thetext>Isn&apos;t the role implied:

http://www.w3.org/TR/wai-aria/roles#columnheader

Base Concept: HTML th[scope=&quot;col&quot;]

i.e. why take a th[scope=&quot;col&quot;] and add a role of columnheader, when the role is already known.

As far as I&apos;m aware, the role attribute is for when incorrect HTML is being used, perhaps being generated by JS with spans?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109205</commentid>
    <comment_count>3</comment_count>
    <who name="Craig Francis">craig</who>
    <bug_when>2014-07-23 09:39:41 +0000</bug_when>
    <thetext>Ok, this is more of an issue that needs to be resolved with HTML than the validator:

http://lists.w3.org/Archives/Public/www-validator/2014Jul/0014.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128649</commentid>
    <comment_count>4</comment_count>
    <who name="dmacdona">david100</who>
    <bug_when>2017-06-16 18:57:14 +0000</bug_when>
    <thetext>I filed a but against HTML. 
https://github.com/w3c/html/issues/909#issuecomment-308889446


Editor Steve Faulkner said that &lt;th&gt; does indeed have semantics as shown in the accessibility API mappings doc.

https://w3c.github.io/html-aam/#el-th

Therefore, this should pass the validator

&lt;th aria-sort=&quot;ascending&quot; ...&gt;

It should not require a redundant aria role=&quot;columnheader&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>