<?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>248273</bug_id>
          
          <creation_ts>2022-11-23 06:26:36 -0800</creation_ts>
          <short_desc>AX: In responsive website table linearized with CSS on mobile (display:block on descendant elements) doesn&apos;t work with Safari + VO</short_desc>
          <delta_ts>2022-11-23 07:37:56 -0800</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 16</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Giacomo Petri">giacomo.petri</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>marco.sabidussi</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1914306</commentid>
    <comment_count>0</comment_count>
      <attachid>463691</attachid>
    <who name="Giacomo Petri">giacomo.petri</who>
    <bug_when>2022-11-23 06:26:36 -0800</bug_when>
    <thetext>Created attachment 463691
table code example

This topic is conceptually similar to the one discussed for list elements (https://bugs.webkit.org/show_bug.cgi?id=170179#c1), but different in terms of experience and results.

I found myself in front of a website that is using a simple data table to present information; this website is responsive and, while navigating the content on desktop, the semantic html table is also visually displayed as a table; while instead navigating the content on mobile the table is linearized and thanks to its simple content, table headers are removed from the acc tree (display:none), resulting in a layout table.

Attached a simpler/demo example of the table, code snippet below:

HTML

      &lt;table&gt;
       &lt;caption class=&quot;outscreen&quot;&gt;Your Cart&lt;/caption&gt;
        &lt;thead&gt;
          &lt;tr&gt;
            &lt;th scope=&quot;col&quot;&gt;Item&lt;/th&gt;
            &lt;th scope=&quot;col&quot;&gt;Quantity&lt;/th&gt;
            &lt;th scope=&quot;col&quot;&gt;Price (per item)&lt;/th&gt;
            &lt;th scope=&quot;col&quot;&gt;Total Price&lt;/th&gt;
          &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
          &lt;tr&gt;
            &lt;td&gt;
            	&lt;img src=&quot;img-test.png&quot; alt=&quot;&quot;&gt;
              &lt;div class=&quot;hclass4&quot;&gt;Item name&lt;/div&gt;
            &lt;/td&gt;
            &lt;td&gt;2&lt;/td&gt;
            &lt;td&gt;100$&lt;/td&gt;
            &lt;td&gt;200$&lt;/td&gt;
          &lt;/tr&gt;
        &lt;/tbody&gt;
      &lt;/table&gt;

CSS

      table, tbody, th, tr, td {
        border:1px solid;
        border-collapse: collapse;
      }

      @media only screen and (max-width: 800px) {
        table, tbody, th, tr, td {
          border:0;
        }
        tr, td {display:block;}
        th {display: none;}
        tr&gt;td:nth-child(3) {
          display:none;
        }
      }

Now, with Safari + VO on desktop, everything is working as expected, but testing with an iPhone (Safari + VO again) the table is announced as empty.
First of all, a table without table headers should be a layout table and not a data table (but this might be partially relevant here).
But, even more important is that a layout choice is affecting negatively VoiceOver users, which are prevented to access the content on iPhone.

Even though the issue can be solved simply by forcing also the &lt;table&gt; and &lt;tbody&gt; to look like block elements with &quot;display: block&quot;, this is not intuitive.
I don&apos;t know how many occurrences of this scenario are present on webpages, but right now this is a blocker for the specific website, even if the semantic structure of the table is correct.
We know that accessibility is unfortunately an unfamiliar topic for many and this scenario makes things even more complicated, especially for people that try to improve the accessibility experience but don&apos;t have a deep experience with the topic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1914307</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-11-23 06:26:49 -0800</bug_when>
    <thetext>&lt;rdar://problem/102627057&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>463691</attachid>
            <date>2022-11-23 06:26:36 -0800</date>
            <delta_ts>2022-11-23 06:26:36 -0800</delta_ts>
            <desc>table code example</desc>
            <filename>table-display-block-example-issue.html</filename>
            <type>text/html</type>
            <size>1082</size>
            <attacher name="Giacomo Petri">giacomo.petri</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KCTxoZWFkPgoJCTx0aXRsZT5UYWJsZSBl
cnJvcjwvdGl0bGU+CgkJPHN0eWxlPgogICAgICB0YWJsZSwgdGJvZHksIHRoLCB0ciwgdGQgewog
ICAgICAgIGJvcmRlcjoxcHggc29saWQ7CiAgICAgICAgYm9yZGVyLWNvbGxhcHNlOiBjb2xsYXBz
ZTsKICAgICAgfQoKCQkJQG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA4MDBweCkg
ewogICAgICAgIHRhYmxlLCB0Ym9keSwgdGgsIHRyLCB0ZCB7CiAgICAgICAgICBib3JkZXI6MDsK
ICAgICAgICB9CiAgICAgICAgdHIsIHRkIHtkaXNwbGF5OmJsb2NrO30KICAgICAgICB0aCB7ZGlz
cGxheTogbm9uZTt9CiAgICAgICAgdHI+dGQ6bnRoLWNoaWxkKDMpIHsKICAgICAgICAgIGRpc3Bs
YXk6bm9uZTsKICAgICAgICB9CiAgICAgIH0KICAgIDwvc3R5bGU+Cgk8L2hlYWQ+Cgk8Ym9keT4K
CQk8bWFpbj4gICAgICAKICAgICA8dGFibGU+CiAgICAgICA8Y2FwdGlvbj5Zb3VyIENhcnQ8L2Nh
cHRpb24+CiAgICAgICAgPHRoZWFkPgogICAgICAgICAgPHRyPgogICAgICAgICAgICA8dGggc2Nv
cGU9ImNvbCI+SXRlbTwvdGg+CiAgICAgICAgICAgIDx0aCBzY29wZT0iY29sIj5RdWFudGl0eTwv
dGg+CiAgICAgICAgICAgIDx0aCBzY29wZT0iY29sIj5QcmljZSAocGVyIGl0ZW0pPC90aD4KICAg
ICAgICAgICAgPHRoIHNjb3BlPSJjb2wiPlRvdGFsIFByaWNlPC90aD4KICAgICAgICAgIDwvdHI+
CiAgICAgICAgPC90aGVhZD4KICAgICAgICA8dGJvZHk+CiAgICAgICAgICA8dHI+CiAgICAgICAg
ICAgIDx0ZD4KICAgICAgICAgICAgCTxpbWcgc3JjPSJpbWctdGVzdC5wbmciIGFsdD0iIj4KICAg
ICAgICAgICAgICA8ZGl2IGNsYXNzPSJoY2xhc3M0Ij5Qcm9kdWN0IG5hbWU8L2Rpdj4KICAgICAg
ICAgICAgPC90ZD4KICAgICAgICAgICAgPHRkPjIgaXRlbXM8L3RkPgogICAgICAgICAgICA8dGQ+
MTAwJDwvdGQ+CiAgICAgICAgICAgIDx0ZD4yMDAkPC90ZD4KICAgICAgICAgIDwvdHI+CiAgICAg
ICAgPC90Ym9keT4KICAgICAgPC90YWJsZT4KICAgIDwvbWFpbj4gCgk8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>