Pronounce abbreviations or initialisms as individual characters in androids Talkback accessibility

限于喜欢 提交于 2019-12-23 01:04:37

问题


I am working on an voice accessibility feature using talkback but when the voice over reads of the text from the text view, it reads the abbreviation/initialism as a word instead of individual characters. For example FBI should be F B I and not read out as a word.


回答1:


Do not try to force a screen reader to read words or abbreviations a certain way. That can mess up the user experience for braille users. Screen readers have settings to control the verbosity and what to do with words that are in all caps. This allows the user to control how they want to hear it.

Additionally, when a word is pronounced in an unfamiliar way, the screen reader user can navigate letter by letter to hear the abbreviation.

Update November 29, 2018: Based on comments, here is some additional information.

If you have an abbreviation in the middle of a sentence, such as

The FBI always gets its man

then you can have hidden text for screen readers to force the letters to be pronounced separately, but I will again say that this is highly discouraged.

<p>The FBI always gets its man</p>

can become

<p>The <span aria-hidden="true">FBI</span> <span class="sr-only">F B I </span> always gets its man</p>

So the visible "FBI" is hidden from screen readers and it's followed by a visually hidden text of "F B I" for screen readers to announce as separate letters.

(The "sr-only" class can be seen at What is sr-only in Bootstrap 3?)

There are two (at least) disadvantages to forcing this behavior:

  1. As mentioned, Braille users will get extra text. Granted, in this case, it's not that much but still adds to overhead in reading Braille.

    Basic "FBI" in Braille:
    There are two single dots in the beginning. The first single dot usually means the next character is uppercased. When you have two single dots in a row, it's like a "caps lock" so it tells you all the following letters are in caps.

    Embedded spaces in "F B I"
    In this case, the "caps" character (single dot) has to appear before each letter because they're separate "words" and there are gaps between each letter.

    So "FBI" takes up 5 cells and "F B I" takes up 8 cells.

  2. The second disadvantage is that on iOS devices and Voiceover, since the paragraph (<p>) is split up by embedded <span> elements, as you swipe right with Voiceover, it will stop on every break so you'll hear "The", then "F B I", then "always gets its man". Not a great user experience. Not sure if Talkback does the same.



来源:https://stackoverflow.com/questions/53547488/pronounce-abbreviations-or-initialisms-as-individual-characters-in-androids-talk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!