0

当我升级到 Android 5.x 时,看起来 Talkback 将不再读取混合应用程序中的数据表标题。有人知道这是否坏了吗?

我正在使用 Cordova 和 jQuery Mobile 来创建我的应用程序,下面是我正在使用的代码:

<div id="home" data-role="page" data-title="Home">
        <div data-role="content">
            <div date-role="header">
                <h1>Data Table 1</h1>
            </div>
            <div role="main" class="ui-content">
                <table  data-role="table" id="my-table" data-mode="reflow">
                   <tr>
                       <th id="c1">Service Branch</th>
                       <th id="c2">Percentage of Women</th>
                   </tr>
                   <tr>
                       <th id="r1">Army</th>
                       <td headers="r6 c2">13.4%</td>
                   </tr>
                   <tr>
                       <th id="r2">Navy</th>
                       <td headers="r2 c2">15.9%</td>
                   </tr>
                   <tr>
                       <th id="r3">Marine Corps</th>
                       <td headers="r3 c2">6.6%</td>
                   </tr>
                   <tr>
                       <th id="r4">Air Force</th>
                       <td headers="r4 c2">19.2%</td>
                   </tr>
                   <tr>
                       <th id="r5">Coast Guard</th>
                       <td headers="r5 c2">13.4%</td>
                   </tr>
                   <tr>
                       <th id="r6">National Guard & Reserves</th>
                       <td headers="r6 c2">17.9%</td>
                   </tr>
               </table>
            </div>
        </div>
    </div>
4

1 回答 1

0

您是否尝试过使用 a11y 项目建议的模式?他们使用“范围”属性而不是“标题”。

<table>
  <caption>Star Wars Trilogy Data</caption>
  <tbody>
    <tr>
      <th scope="col">Title</th>
      <th scope="col">Director</th>
      <th scope="col">Release Date</th>
    </tr>
    <tr>
      <th scope="row">Star Wars: Episode IV - A New Hope</th>
      <td>George Lucas</td>
      <td>May 25th, 1977</td>
    </tr>
    <tr>
      <th scope="row">Star Wars: Episode V - The Empire Strikes Back</th>
      <td>Irvin Kershner</td>
      <td>May 21st, 1980</td>
    </tr>
    <tr>
      <th scope="row">Star Wars: Episode VI - Return of the Jedi</th>
      <td>Richard Marquand</td>
      <td>May 25th, 1983</td>
    </tr>
  </tbody>
</table>

http://codepen.io/svinkle/pen/zmlEi

于 2016-02-11T20:29:05.433 回答