How do you type negative one hundred dollars? Chances are, you do it something like this:
But did you know there's another way to do it? Behold:
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:
...what you actually get is something completely different—a Unicode "Minus" character.
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
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.
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.
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:
...but then we'd have JAWS and VoiceOver announcing both.
So instead, we'll have to resort to this:
<span class="visually-hidden">minus</span><span aria-hidden="true">−</span>$100
If you've got another workaround, please let me know about it!