Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Tip Calculator challenge solution with ReactJS

@maricastroc

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

@0xabdulkhaliq

Posted

Hello there 👋. Congratulations on successfully completing the challenge! 🎉

  • I have other recommendations regarding your code that I believe will be of great interest to you.

HTML 🏷️:

  • This solution may cause accessibility errors due to lack of semantic markup, which causes lacking of landmark for a webpage and allows accessibility issues to screen readers, due to accessibility errors our website may not reach its intended audience, face legal consequences, and have poor search engine rankings, highlighting the importance of ensuring accessibility and avoiding errors.
  • What is meant by landmark ?, They used to define major sections of your page instead of relying on generic elements like <div> or <span>. They are use to provide a more precise detail of the structure of our webpage to the browser or screen readers
  • For example:
    • The <main> element should include all content directly related to the page's main idea, so there should only be one per page
    • The <footer> typically contains information about the author of the section, copyright data or links to related documents.
  • So resolve the issue by replacing the react's root node <div id="root"> with the proper semantic element <main> in your index.html file to improve accessibility and organization of your page

.

I hope you find this helpful 😄 Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

1

@maricastroc

Posted

@0xAbdulKhalid

Hello, you! 👋

Thank you so much for the suggestions and explanations! I've already made the changes regarding the semantic markup, and your feedback has helped me a lot.

Thank you very much! 😄

0

@Abdul-Waris-2566

Posted

Just three issues pertaining your calculator app.

1-Input fields: the input fields' widths must occupy 100% of their parents width's containers. The issue can be spotted in input's focus state.

2-Adding error: You missed adding the error text while the people's input field is 0. You can add it with JavaScript. you should also change the people input field's border's color to red.

3-Reset button: reset button is already activated when the app is initiated. you can fix that.

I hope this could help you in spotting as well as solving the above said problems.

A simple question to you: could you tell me how long have you been learning to code?

Marked as helpful

0

@maricastroc

Posted

@Abdul-Waris-2566

Hello!

Thank you so much for your feedback. I just have one comment to make regarding the first issue. If you notice, if we leave the inputs with 100% of their parents width's container, we've got a bug if the user types an extremely high value, with many characters - numeric characters will override container icons. That's why I chose to leave the input with only 80% of the width of its parent element.

Regarding the other problems reported, I'm going to make the necessary changes to correct them.

Answering your final question, I've been learning to code for six months now.

Again, thank you so much for the notes!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord