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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>197082</bug_id>
          
          <creation_ts>2019-04-18 16:48:19 -0700</creation_ts>
          <short_desc>AX: Table becomes layout table if provided author accName or description</short_desc>
          <delta_ts>2019-09-18 09:44:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>Safari 12</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.14</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Scott">scottaohara</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cfleizach</cc>
    
    <cc>mfairchild365</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1528655</commentid>
    <comment_count>0</comment_count>
    <who name="Scott">scottaohara</who>
    <bug_when>2019-04-18 16:48:19 -0700</bug_when>
    <thetext>In an effort to provide a table with a &quot;caption&quot; by use of ARIA, I ran into unexpected behavior.

Using aria-labelledby on a table element to point to paragraph, the table semantics were removed.  No role is exposed in Safari&apos;s accessibility node inspector.  VoiceOver + Safari announced the table as a group.

Chrome exposes the table as a layoutTable in its inspector.

I then tried aria-describedby, and the title attribute.  With both of these attributes placed on the table element no role is exposed, VoiceOver doesn&apos;t announce it as a group.


Reduced test case:
https://codepen.io/scottohara/full/jRZLMy


Testing with Firefox and IE11, the above mentioned issues do not occur.  

Using JAWS with Firefox and IE11, the tables all announce as expected.


---

Expected Behavior

If a table is provided an aria-labelledby, it should be given an accessible name (like caption does).
If a table is provided an aria-describedby or title attribute, it should expose a description.

In neither situation should the table be converted to a layoutTable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1528656</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-04-18 16:48:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/50033934&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571894</commentid>
    <comment_count>2</comment_count>
    <who name="Scott">scottaohara</who>
    <bug_when>2019-09-18 08:01:30 -0700</bug_when>
    <thetext>Looking at this again, if a table has column headers defined, aria-label and aria-labelledby appear to work as expected and the table is not announced as a group: https://s.codepen.io/joe-watkins/debug/MWgPEYr

So seems that a table will only be exposed as a table in webkit if the table contains th elements, or a caption. If those are not present, even if the table is given an accessible name via aria-label/labelledby it will not be treated as a layout table.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1571926</commentid>
    <comment_count>3</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2019-09-18 09:44:54 -0700</bug_when>
    <thetext>(In reply to Scott from comment #2)
&gt; Looking at this again, if a table has column headers defined, aria-label and
&gt; aria-labelledby appear to work as expected and the table is not announced as
&gt; a group: https://s.codepen.io/joe-watkins/debug/MWgPEYr
&gt; 
&gt; So seems that a table will only be exposed as a table in webkit if the table
&gt; contains th elements, or a caption. If those are not present, even if the
&gt; table is given an accessible name via aria-label/labelledby it will not be
&gt; treated as a layout table.

I think if a table has a label, we should expose it as a data table. that sounds like the bug in this case</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>