Skip navigation

Minus the minus: A PSA about screen readers and negative numbers

Posted Jan 18, 2020

Update: NVDA 2020.1 was released on May 7, and thankfully it includes the fix from yours truly to properly announce the minus symbol. Talkback still has an issue with the hyphen-minus as reported below, however, so be sure to use the minus symbol for negative amounts going forward.


Original post:

How do you type negative one hundred dollars? Chances are, you do it something like this:

-$100

But did you know there's another way to do it? Behold:

−$100
Meme: Fry from Futurama squinting with caption 'not sure if serious or just trolling'

What's that? You don't see a difference? Well if you're using a screen reader then there's a good chance that you heard a difference. In fact, one of those may not have sounded like it was negative at all.

What's in a number

See, it turns out that the first number is what's called a "hyphen-minus" in Unicode. It's what you get when you type the minus/hyphen/dash/whatever you want to call it on your keyboard, next to the numbers.

If, on the other hand, you're creating a web page and you do this:

−$100

...what you actually get is something completely different—a Unicode "Minus" character.

John Cleese wearing a bikini, lying on a desk in a field. The caption says 'and now for something completely different'

OK, maybe not that different, but different enough to cause us problems when it comes to screen readers.

Rock and a hard place

It turns out that not all screen readers recognize both of these characters. JAWS and VoiceOver seem to do OK with both of them, but Talkback and NVDA apparently have different opinions.

Talkback doesn't recognize the minus-hyphen, but does recognize the minus. The result being that if you write your negative amounts the first way, Talkback will announce it as a positive amount, not negative. It does get it right if you remove the dollar sign, however.

Just to make matters worse, NVDA does the exact opposite—announces the minus-hyphen, but not the minus. It also does this regardless of whether it's a dollar amount or a plain number.

This is bad enough, but gets even worse when you consider that we're talking about dollar amounts. Let's say you're using Talkback or NVDA with a stock trading platform—your screen reader might be telling you that your holdings are going up when they're actually going down.

Let's fix this

NVDA

Thankfully, NVDA is open-source. I've opened a PR to address the issue on that side (if you'd like to see it get fixed, you can chime in on the related issue).

At the time of this writing, I'm pretty sure the NVAccess team is focused on the 2019.3 beta, so fingers crossed that they'll take it into the first 2020 edition.

Talkback

Getting things fixed here seems more tricky. To be honest, I'm not even sure where to start.

The issue was reported on Google's Issue Tracker over five years ago, and hasn't gotten any attention. According to some helpful folks on the Eyes-Free Google Group it's actually a problem with Google's Text-to-Speech engine rather than Talkback itself.

I've sent an email to the feedback address listed on the Google Play page, and will update this if I get a response.

If you have any better ideas on how to get this on the radar of the folks at Google, please ping me.

Let's work around this

So what do we do in the meantime? We could do something like this:

<span class="visually-hidden">&minus;</span>-$100

...but then we'd have JAWS and VoiceOver announcing both.

Meme: Captain Picard facepalm, caption is 'this shouldn't be this hard'

So instead, we'll have to resort to this:

<span class="visually-hidden">minus</span><span aria-hidden="true">&minus;</span>$100

If you've got another workaround, please let me know about it!

Share

Contact

  • Contact me on Twitter
  • Contact me on LinkedIn
  • Contact me by Email