s-yadav / react-number-format

React component to format numbers in an input or as a text.
MIT License
3.85k stars 404 forks source link

Negative values are displayed with - instead of − and so isn't read out correctly by all screen readers #845

Open sarajw opened 3 months ago

sarajw commented 3 months ago

Describe the issue and the actual behavior

The hypen-minus (https://www.compart.com/en/unicode/U+002D) is used for negative numbers displayed using NumberFormat, and are read out by VoiceOver on MacOS only as a brief pause, meaning a negative currency value is read out as positive.

Describe the expected behavior

The minus sign should be − (https://www.compart.com/en/unicode/U+2212) which allows it to be read out by VoiceOver with 'minus' said beforehand so that the value is correctly read out as negative.

Provide steps to reproduce this issue

Use the VoiceOver screen reader on a Mac to read a negative currency example that uses a hyphen-minus, such as: -$246.31 Compare with this example using the minus sign: −$246.31

Please check the browsers where the issue is seen