Calculator project feedback please?

I didn’t really follow the rules for the project in terms of using the ids and that kind of stuff, just started building a calculator from scratch, id mostly like to see what you think of my way of solved the js part



Overall this is nicely done but there are some accessibility issues.

  • Mouseover on the the buttons should probably have a pointer cursor.
  • Speaking of buttons, you are using <div>s for all of the buttons instead of <button>. While this doesn’t affect people who use a mouse it is not good for people who use a keyboard as they cannot tab through the buttons to press them. Basically, your calculator is not keyboard accessible at all.
  • When I manually increase the text size the display at the top overlaps itself so I can no longer see equation above the result. If you don’t know how to manually increase the text size, using Firefox go to the ‘View->Zoom’ menu and activate ‘Zoom Text Only’. Then while holding down the Ctrl key scroll your middle mouse button to increase the text size. Your display should gracefully handle text size increases of at least 300%.
  • The white text on light gray and orange backgrounds does not quite have enough color contrast. You can check for color accessibility at
  • I didn’t do an extensive check on correctness, but I did find that n * 0 is giving the answer n instead of 0.
1 Like

you are amazing, thanks so much for taking the time to check it, appreciate it