WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Proper Unicode or html entity for negative sign

for

From: Patrick H. Lauke
Date: Mar 14, 2023 9:29AM


On 14/03/2023 15:21, Elizabeth Thomas wrote:
>
> Does anyone know the correct Unicode or HTML entity for the negative sign (e.g., to represent the number negative 19)? The context is a negative number used in a sentence; it’s not in a mathematical expression or equation.
> I know I could use the hyphen, but that will be ignored by many technologies because it’s wrong and that’s not what hyphens are for. Consequently, I don’t think it will be clear to some people that the number is negative.
> I could use Unicode entity 2212, but that looks super weird and I’m not sure that’s correct because that’s for the minus operator.
> Is there another entity I can use that will be read correctly by AT like a screen reader? Or is the Unicode entity 2212 the correct character for this use case? Or Is hyphen minus (002D) the correct entity? (I’m definitely not using the en dash, which is for ranges as it means “to” or “through”).

In theory, the regular "-" (U+002D, hyphen-minus) is perfectly valid as
a negative/minus sign. However, screen readers will often treat this as
just a hyphen, and not announce it (the same way they don't announce
general punctuation, unless explicitly set to do so), unless their
heuristics kick in to instead treat it as a minus sign.
https://www.compart.com/en/unicode/U+002D

You could indeed try "−" (U+2212 minus sign), which also maps to −
HTML entity, but suggest testing in AT if this has the desired effect.
https://www.compart.com/en/unicode/U+2212

P
--
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke