简体   繁体   English

aria-label 应该大写吗?

[英]Should aria-label's be capitalized?

I've seen some examples and documentation that capitalizes the first word of aria labels.我看过一些示例和文档,它们将 aria 标签的第一个单词大写。 Why is this?这是为什么? What if you have two words?如果有两个字呢?

It doesn't matter if it's sentence case, camel case, or all lowercase.无论是句子大小写,骆驼大小写还是全部小写都没有关系。 Most screen readers will say it the same.大多数屏幕阅读器都会这么说。 But don't make the label all caps because that can change the inflection of the screen reader voice and can cause some words to be read as separate characters.但是不要让标签全部大写,因为这会改变屏幕阅读器声音的变化,并可能导致一些单词被作为单独的字符阅读。 For example, "MY LABEL" could be potentially be pronunced as "em why el a be ee el".例如,“MY LABEL”可能发音为“em why el a be ee el”。

I was using ChromeVox to test this behaviour and the screen reader in all the three cases is reading using the same pronunciation and in the same speed, ie for these examples:我使用ChromeVox来测试这种行为,并且所有三种情况下的屏幕阅读器都使用相同的发音和相同的速度阅读,即对于这些示例:

  1. THIS IS MY TEXT这是我的文字
  2. This Is My Text这是我的文字
  3. this is my text这是我的文字

Haven't noticed any difference.没发现有什么区别。

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

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