Ensuring negative numbers are available for everyone | Deque (2024)

This post is co-authored by Michael Fairchild and Jeremy Katherman.

That little minus sign before a number is very important. It can mean the difference between having money in your bank account or paying overdraft fees. It can be the difference between a deposit or a withdrawal.

Negative numbers can be indicated in several ways, including:

  • Red text: $100
  • Parentheses used for the number: ($100)
  • A minus sign in front of the number: -$100

These patterns can present various challenges for accessibility. To discuss those challenges and how to address them, let’s center the conversation around a couple of personas.

Each persona will contain an acceptance criteria that outlines the expectation and how to test it.

Summary

  • While color may visually emphasize that a number is negative, another method is required to signal that it is negative. Using parentheses or adding a minus sign are common solutions.
  • For a minus sign: the minus character (`−`) will provide the most robust support across most screen readers and formats.
    The hyphen-minus character that is found on keyboards (`&#45`)also has pretty good support but has some gotchas. If you use the hyphen-minus character, do not put a space between the character and the value.
  • For parentheses: It’s best to make sure that users are informed that negative numbers will be marked in parentheses, especially if used in a non-accounting context where the parentheses may be unexpected.

Persona 1: a low-vision user who is colorblind.

Some people who have low vision or are colorblind may incorrectly conclude that a number is positive if red text is the only indicator that it is negative. While color may visually emphasize that a number is negative, another method is required to signal that it is negative. Using parentheses or adding a minus sign are common solutions.

Acceptance criteria

Scenario: A low vision user who is colorblind can determine when a number is negative
Given I am testing the low-vision / colorblind experience
When the page contains a negative number
And I look at the page through a grayscale filter
Then I can tell that the number is negative

Examples

Bad example: $100
Good example: ($100)

Persona 2: a blind screen reader user.

How the negative number is coded is also very important. If it is coded incorrectly, some blind screen reader users might not be aware the number is negative. There are several techniques to accomplish this with varying levels of screen reader support.

Acceptance criteria

Scenario: A blind screen reader user is made aware that a number is negative.

Given I am testing the blind screen reader user experience
And the page contains a negative number
When I navigate to the negative number
Then I hear that the number is negative (usually announced as “minus”)

Using a minus sign

There are several characters that can be used to code a minus sign. Some examples:

  • Unicode’s hyphen-minus character (`&#45`). This is the character that is most often used because it’s the character found on most keyboards. Note: the hyphen-minus character is technically different from the hyphen character in unicode. The hyphen character is not found on most keyboards and is not commonly used.
  • The minus character (`−`). This character is not found on most keyboards and must be coded. In HTML, a common way to code this character is by using the `−` HTML entity.
  • Other dash characters, such as em and en dashes. These have different styles and meanings than the hyphen-minus character and minus characters, but are sometimes used in designs for their appearance.

There are also several formats that can be used to indicate a negative dollar value. A few examples:

  • -$100 (no space between the minus sign and the dollar sign).
  • – $100 (a space between the minus sign and the dollar sign).
  • $-100 (dollar sign before the minus sign).

Recommendation

The minus character (`−`) will provide the most robust support across most screen readers and formats. The hyphen-minus character (`&#45`) also has pretty good support but has some gotchas, especially with certain formats. If you use the hyphen-minus character, do not put a space between the character and the value.

Using parentheses

It is a common practice, especially in accounting, to indicate a negative number by wrapping the amount in parentheses: ($100). Testing shows that most screen readers ignore parentheses with default settings and typical navigation commands, which means that if the user isn’t explicitly looking for the parentheses, they might not realize that the number is negative.

Recommendation

It’s best to make sure that users are informed that negative numbers will be marked in parentheses, especially if used in a non-accounting context where the parentheses may be unexpected. This notice will prompt users to explicitly look for the parentheses while navigating the content. It may also be worth considering using a minus sign instead of parentheses.

Tests and results

The testing done for this blog post is pretty exhaustive, covering eight different screen reader and browser combinations. This level of testing can sometimes be helpful in revealing support gaps and gotchas, but takes a lot of time, effort, and expertise, and may not always be reasonable to perform. Nor will it always be possible to achieve 100% support.

The testing shows that:

  • The minus character (`−`) yields great support in most screen readers, and suffers less situational gotchas than the hyphen-minus character.
    • Narrator does not support this character. However, Windows users primarily use other screen readers, so this is not likely to cause a significant issue unless your users are restricted to just using Narrator (perhaps for example, because of corporate restrictions).
  • The hyphen-minus character (`-`) provides good support in all formats that were tested. This will likely be a good starting point, and is also probably the easiest to implement.
    • There are some gotchas with the hyphen-minus character that cause some screen readers to not announce the value when reading in browse mode (or similar). For example: Including a space between the hyphen-minus and the number value. Avoid a space between the character and the value whenever possible to steer clear of this problem.

The tests were executed using default settings in all screen readers and used the command to navigate to the next line (or equivalent) in browse mode to navigate to the number under test. For example, in JAWS, NVDA, and Narrator, the down arrow command was used. In VoiceOver for iOS and talkback for Android, the swipe-right gesture was used.

Screen reader settings and navigation commands can be used to announce the character even if it is not announced when navigating line-by-line or element-by-element. However, these may not be used by all screen reader users, especially if it is not obvious that the number they are reading might be negative.

Test suite with several examples of how negative numbers might be formatted and coded. This is not an exhaustive list of all the ways that a negative number could be represented.

ScenarioNVDA/ChromeNVDA/FirefoxJAWS/ChromeJAWS/FirefoxNarrator/EdgeVO/MacOS/SafariVO/iOS/SafariTalkback/Chrome
1 Hyphen-minus before dollar sign, no spacepass “minus 100 dollars”pass “minus 100 dollars”pass “minus dollar 100”pass “minus dollar 100”Pass “dash dollar 100”Fail “100 dollars”pass “minus 100 dollars”pass “minus dollar 100”
2 Hyphen-minus before dollar sign, with spaceFail “100 dollars”Fail “100 dollars”Fail “dollar 100”Fail “dollar 100”Fail “100 dollars”Fail “100 dollars”Fail “100 dollars”Pass “minus 100 dollars”
3 Hyphen-minus after dollar sign, no spacePass “dollar minus 100”Pass “dollar minus 100”Pass “dollar minus 100”Pass “dollar minus 100”Pass “dollar dash 100”Pass “dollar sign minus 100Pass “dollar sign minus 100”Pass “dollar minus 100”
4 Minus character before dollar sign, no spacePass “minus 100 dollars”Pass “minus 100 dollars”Pass “minus dollar 100”Pass “minus dollar 100”Fail “dollar 100”Pass “minus 100 dollars”Pass “minus 100 dollars”Pass “Minus dollar 100”
5 Minus character before dollar sign, with spacePass

“Minus 100 dollars”

Pass

“Minus 100 dollars”

Pass “minus dollar 100”Pass “minus dollar 100”Fail “100 dollars”Pass “minus 100 dollars”Pass “minus 100 dollars”Pass “minus 100 dollars”
6 Minus character after dollar sign, no spacePass “dollar minus 100”Pass “dollar minus 100”Pass “dollar minus 100”Pass “dollar minus 100”Fail “dollar 100”Pass “dollar sign minus 100”Pass “dollar sign minus 100”Pass “dollar minus 100”
7 ParenthesesFail “100 dollars”Fail “100 dollars”Pass “left paren dollar 100 right paren”Pass “left paren dollar 100 right paren”Fail “100 dollars”Fail “100 dollars”Fail “100 dollars”Fail “dollar 100”
8 Parentheses hackPass “minus 100 dollars”Pass “minus [next element] 100 dollars”Pass “minus dollar 100”Pass “minus dollar 100”Fail “(silence) [next element] 100 dollars”pass “minus [next element] 100 dollars”pass “minus [swipe right] 100 dollars”Pass “minus [swipe right] 100 dollars”
9 Text followed by hyphen-minus before dollar sign, no spacePass “Balance minus 100 dollars”Pass “Balance minus 100 dollars”Pass ”Balance colon minus dollar 100”Pass “Balance colon minus dollar 100”Pass “balance dash dollar 100”Pass “balance minus 100 dollars”Pass “balance minus 100 dollars”Pass “balance minus dollar 100”
10 text followed by minus character before dollar sign, no spacePass “Balance minus 100 dollars”Pass “Balance minus 100 dollars”Pass “Balance colon minus dollar 100”Pass “Balance colon minus dollar 100”Fail “balance dollar 100”Pass “balance minus 100 dollars”Pass “balance minus 100 dollars”Pass “balance minus dollar 100”

Versions

  • NVDA 2023.1 with Chrome 116 on Windows 11 22H2
  • NVDA 2023.1 with Firefox 117 on Windows 11 22H2
  • JAWS 2023.2307.37 with Chrome 116 on Windows 11 22H2
  • JAWS 2023.2307.37 with Firefox 117 on Windows 11 22H2
  • VO on iOS 16.6
  • VO with Safari 16.6 on MacOS 13.5
  • Talkback 13.5 with Chrome 115 on Android 13
  • Narrator with Edge 116 on Windows 11 22H2

Jeremy Kathermanis a Senior Accessibility Consultant/Coach at Deque with over a decade of experience leading teams in accessibility in the banking and insurance industry and consulting with various companies worldwide to develop their accessibility programs. Throughout his career he has worked to inspire inclusion and a love of learning. He is a Certified Professional in Web Accessibility (CPWA) from the International Association of Accessibility Professionals (IAAP) and eager to help you take the next step in your accessibility journey.

Ensuring negative numbers are available for everyone | Deque (2024)

FAQs

Ensuring negative numbers are available for everyone | Deque? ›

Summary. While color may visually emphasize that a number is negative, another method is required to signal that it is negative. Using parentheses or adding a minus sign are common solutions. For a minus sign: the minus character (`−`) will provide the most robust support across most screen readers and formats.

How are negative numbers important? ›

Negative numbers are used to describe values on a scale that goes below zero, such as the Celsius and Fahrenheit scales for temperature. The laws of arithmetic for negative numbers ensure that the common-sense idea of an opposite is reflected in arithmetic.

How do you explain negative numbers to someone? ›

On a number line, they appear to the left of zero, opposite positive numbers. They're commonly used in real-world situations like measuring temperatures below freezing. Understanding negative numbers helps us grasp a broader range of mathematical concepts.

Can you think of a situation when you might need to use negative numbers? ›

For instance, in finances negative numbers can be used to show debt. If I overdraw my account (take out more money than I actually have), my new bank balance will be a negative number. Not only will I have no money in the bank—I'll actually have less than none because I owe the bank money.

Is it possible to have a negative number? ›

A negative number is one that falls below, or to the left of, 0 on a number line. Negative numbers are used frequently in math and science and therefore being able to add, subtract, multiply and divide them is very important.

How can negative numbers be used in real life? ›

Negative numbers are commonly used in describing below freezing point temperature, credit of money, elevation below sea level, elevator level when it is below the ground level, negative scoring in exams, as a penalty in quizzes/games, etc.

What is the negative number trick? ›

In order to add and subtract negative numbers: If you have two signs next to each other, change them to a single sign. If the signs are the same replace with a positive sign (+). If the signs are different, replace with a negative sign (−).

How to explain negative numbers to children? ›

When you count backwards from zero, you go into negative numbers. Positive numbers are more than zero: 1, 2, 3, 4, 5, etc. Negative numbers are less than zero: -1, -2, -3, -4, -5, etc. A number line can be used to order negative and positive numbers.

What is a fun way to teach negative numbers? ›

A great way for children to learn negative and positive numbers is to create a visual aid with drawing sequences. Draw some sequences with negative and positive numbers on the board. Ask pupils to tell you if the sequences are right or wrong using their current knowledge of numbers.

What are examples of negative value? ›

A real quantity having a value less than zero ( < 0 ) is said to be negative. Negative numbers are denoted with a minus sign preceding the corresponding positive number, i.e., -2, -100.

How do you handle negative situations? ›

Exercise your ability to respond positively, take responsibility for your role in negative situations, and allow yourself to let go of negative feelings that might be trapped inside of you. Also, take advantage of the pareto principle and focus most of your efforts on the tasks that get the most results.

Why are negative numbers important? ›

Why do we need negative numbers? Negative numbers help us describe values less than zero.

What is the most negative number in the world? ›

The greatest negative integer is -1. From there the numbers progress towardnegative infinity. There are an infinite number of negative integers as they approach negative infinity.

When did negative numbers start being used? ›

Negative numbers were first introduced around 200 BCE in China. They represented the amount of something being purchased or a debt. The first mathematician to mention negative numbers in any mathematics work was Diophantus. He began to look at equations that would result in negative number answers.

Why is the negative important? ›

Benefits of negative feelings include: Authenticity. We need to know what is true for us and to convey our truth to others. We generally would appreciate this from others as well.

What is the function of a negative number? ›

Negative numbers are used in plots to represent values below a zero point, like temperatures below freezing, elevations below sea level, or losses in finance.

Why did people find they needed negative numbers? ›

Negative numbers were first introduced around 200 BCE in China. They represented the amount of something being purchased or a debt. The first mathematician to mention negative numbers in any mathematics work was Diophantus. He began to look at equations that would result in negative number answers.

Why is it important to know whether a number is positive or negative? ›

Positive and negative signs in an equation represents whether the number is greater than zero or smaller than zero. According to the signs given in equation the mathematical operation such as addition, subtraction, multiplication and division can be performed.

Top Articles
Top 10 Cryptos To Invest In 2024: Revealed | ZebPay
How to Avoid Capital Gains Tax on Real Estate
W B Crumel Funeral Home Obituaries
The Phenomenon of the Breckie Hill Shower Video Understanding Its Impact and Implications - Business Scoop
Cvs Rt Pcr Test
Terry Gebhardt Obituary
What Does Sybau Mean
Rick Harrison Daughter Ciana
Ups Store Fax Cost
Stellaris Mid Game
Seafood Restaurants Open Late Near Me
Craigslist Jobs Glens Falls Ny
Xfinity Store By Comcast Branded Partner Fort Gratiot Township Photos
Chlamydia - Chlamydia - MSD Manual Profi-Ausgabe
라이키 유출
My Big Fat Greek Wedding 3 Showtimes Near Regal Ukiah
Jinx Cap 17
13.2 The F Distribution and the F Ratio - Statistics | OpenStax
Tani Ahrefs
'Blue Beetle': Release Date, Trailer, Cast, and Everything We Know So Far About the DCU Film
Cn/As Archives
Krunker.io - Play Krunker io on Kevin Games
Truist Drive Through Hours
Gestalt psychology | Definition, Founder, Principles, & Examples
Southern Food Buffet Near Me
Frequently Asked Questions | Google Fiber
Peloton Guide Stuck Installing Update
Skyward Login Wylie Isd
Work with us | Pirelli
Southland Goldendoodles
Hyvee.com Login
Where To Find Permit Validation Number
Pain Out Maxx Kratom
Wjar Channel 10 Providence
Zip Tv Guide
Pick N Pull Near Me [Locator Map + Guide + FAQ]
Laurin Funeral Home
Sound Ideas, TAKE, CARTOON - WHISTLE TAKE/Image Gallery
JPX Studios/item asylum
Craigslistwesternmass
Fuzz Bugs Factory Number Bonds
Edo Miller Funeral Home Obituaries Brunswick Ga
Montrose Colorado Sheriff's Department
9294027542
Documentaries About FLDS: Insightful Looks into the Fundamentalist Church
Mathlanguage Artsrecommendationsskill Plansawards
Directions To 401 East Chestnut Street Louisville Kentucky
My Vidant Chart
University of Nevada, Las Vegas
Lbl A-Z
Osrs Nex Mass
Ideological variation in preferred content and source credibility on Reddit during the COVID-19 pandemic
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 6786

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.