Telephone numbers and screen readers

无人久伴 提交于 2019-11-27 15:11:22

I don’t know if (or which) screen readers support these, but (in an ideal world) they should.

CSS: Aural

  • CSS 2.1: speak-numeral: digits;

    Speak the numeral as individual digits. Thus, "237" is spoken "Two Three Seven".

  • CSS Speech Module (CR): speak-as: digits;

    Speak numbers one digit at a time, for instance, "twelve" would be spoken as "one two", and "31" as "three one".

HTML: tel URI

RFC 3996: The tel URI for Telephone Numbers

So instead of

<p>01234 567890</p>

you would have something like

<a href="tel:01234-567890">01234 567890</a>

HTML: Vocabularies

Kenny Thompson

Maybe the speak-numeral property in you stylesheet?

The speak-numeral property is used only in Aural Stylesheets.

The aural rendering of a document combines sounds and voices to go through the content of a document. Aural presentation occurs often by converting the document to plain text and then feeding this to a screen reader.

Situations and markets for listening to information could be:

  • for blind people
  • in the car
  • help users learning to read

The speak-numeral property specifies how numerals will be spoken.

Source: http://www.w3schools.com/xslfo/prop_speak-numeral.asp

Also, I found this post helpful: http://www.nicksmith.co.uk/blog/2007/11/09/does-your-screen-reader-read-phone-numbers-properly/

I then came up with the following idea:

0<span>7000</span> 1<span>2</span>1 0<span>2</span>2

In VoiceOver this reads “zero, seven thousand, one, two, one zero, two, two”. Notice I kept the ’7000′ as one number; to me “seven thousand” is more memorable than “seven zero zero zero”.

and further

My research into aural CSS properties found that the property I’d need is already there – ‘speak-numeral: digits;’

you can use a character split

int[] numbers;
for(int i = 0; i<string.length; i++) {
   numbers.add(string[i]);
}

note code is not tested since i dont know what language you are using java, c#, perl

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