DOJO Mobile中的'role','title','alt'是什么意思

What is the meaning of 'role','title','alt' in DOJO Mobile

我是道场小白,这里是Dojo Mobile开发的一款手机应用。

我发现当我打开 ios VoiceOver 时它无法工作。

data-dojo-type="dojox/mobile/ScrollableView" 组件无法再滚动。

我查看了 dojo 网站并找到了解决方案(https://dojotoolkit.org/reference-guide/1.10/dojox/mobile/faq.html):

How do I develop applications which support iOS VoiceOver?

to set the alt, title and role attributes. VoiceOver will read widgets with these attributes set. See tests/test_a11y.html for examples. However, the value of a SpinWheel can not be read by VoiceOver in 1.8.Make sure

按照我访问页面 tests/test_a11y.html(https://github.com/dojo/dojox/blob/master/mobile/tests/test_a11y.html) 的指南进行操作,我发现代码中包含 alt,title,role 属性:

问题来了:这三个属性是什么意思,我可以在我的代码中给每一个Dojo组件添加属性吗?如何确定这些属性的值?

我从 tests/test_a11y.html 中发现一些 dojo 组件只包含角色属性,而其他一些包含所有 three.it让我很困惑...:[=​​17=]

这是我的代码,如何改造:

<div data-dojo-type="dojox/mobile/ContentPane" id="ReceiptsAttach" class="receipts">    
    <div id="receiptsAttachContent" data-dojo-attach-point="dataContent"  data-dojo-type="dojox/mobile/ScrollableView" class="selectContent"></div>

    <div style="clear:both;"></div> 
</div></div>

标题: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title

Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip.

对于 Alt: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes

Alternative text in case an image can't be displayed.

关于角色,是关于Aria的角色。 可以看到:https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA

The role attribute defines what the general type of object is (such as an article, alert, or slider)

可在此处找到角色列表: http://www.w3.org/TR/wai-aria/roles#abstract_roles