简体   繁体   English

Ionic2如何处理屏幕阅读器文本?

[英]Ionic2 How to handle the screen reader text?

I turned on the voiceOver screen reader on iOS device to test it on ionic2 project. 我在iOS设备上打开了VoiceOver屏幕阅读器,以在ionic2项目上对其进行测试。

The screen reader read the html tags like: Header 1 for <h1> also reads the images tags with the images extension : "Image tag png" for <img> . 屏幕阅读器将读取html标签,例如: <h1>标头1还读取图像扩展名为<img>的图像标签:“ Image tag png”。

I don't need to speak the html and the images tags. 我不需要讲html和images标签。

So how to handle the screen reader in the ionic projects? 那么如何处理离子项目中的屏幕阅读器呢?

thanks. 谢谢。

I believe VoiceOver announcing that something is Heading Level 1, 2, 3, etc is expected behavior as it tells the user the level of importance of the text. 我相信VoiceOver会宣布标题级别1、2、3等是预期的行为,因为它告诉用户文本的重要性级别。

For the images, be sure to provide an alt tag to describe the image if it conveys necessary information 对于图像,如果图像传达了必要的信息,请确保提供alt标签来描述图像

<img src="horse.png" at="A gray horse galloping across a green meadow at sunset" />

If it is a decorative image with no useful content or is described by surrounding text, just add an empty alt attribute attribute and the VoiceOver should skip it. 如果它是装饰性图像,没有有用的内容,或者由周围的文字描述,则只需添加一个空的alt属性,VoiceOver应该跳过它。

<img src="decorative.png" alt="" />

OR 要么

<img src="horse.png" alt="" />
<p>A gray horse galloping across a green meadow at sunset.</p>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM