2

I'm having a task that require Voice Assistant on Android to read "monday to friday" for the text "Monday - Friday" displayed on HTML page.

This is my code:

<html>
<p tabindex="0">We have received your request.</p>
<p tabindex="0"><strong>Have a question?</strong></p>
<p tabindex="0">You can call us on&nbsp;<a href="tel:132265">13 22 
65</a>&nbsp;for all general and credit card enquiries<br></br>
<span aria-labelledby="to">Monday - Friday</span> 8am - 7pm (AEST/AEDT)<br>
</br>
Weekends 9am - 6pm (AEST/AEDT)</p>
<p tabindex="0">Or, you can call us on&nbsp;<a href="tel:131012">13 10 
12</a>&nbsp;for all business banking, agribusiness banking and nabhealth 
enquiries<br></br>
<span aria-labelledby="to">Monday - Friday</span> 8am - 9pm (AEST/AEDT)<br>
</br>
Weekends 9am - 6pm (AEST/AEDT)</p>
<p tabindex="0">&nbsp;</p>

<span id="to">monday to friday</span>
</html>

I have try <span aria-label="monday to friday">Monday - Friday</span> but this doesn't work either.

Any suggestion is much appreciated

Minh Mai
  • 35
  • 7
  • 1
    You have tagged this NVDA (which does not run on Android) and mentioned Voice Assistant (which is Samsung Android, as TalkBack is what is on Android). All that being said, do not try to force it. That being said, this answer may be relevant: https://stackoverflow.com/questions/43491644/how-can-i-override-a-screen-readers-pronunciation-of-a-word-in-a-sentence-witho/43496525#43496525 – aardrian Jun 05 '17 at 13:09

1 Answers1

2

Do not try to force pronunciations on screen readers. Users can personalize how punctuation is spoken the way they like it (e.g. what if they wanted to hear "Monday through Friday"). See the question linked by @aardrian for more detail.

That said, a hyphen is the wrong character here and you should be using an &ndash; to separate ranges. Some screen readers will actually read that as "to".

Steve Repsher
  • 390
  • 3
  • 9
  • Interesting. I tried using the ndash instead and it would read "3 – 5" as "3 5" instead of "3 to 5" – JHowzer May 19 '20 at 22:12