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

rest-countries-react

E.sa 300

@E-sa

Desktop design screenshot for the REST Countries API with color theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
4advanced
View challenge

Design comparison


SolutionDesign

Community feedback

T
Grace 29,310

@grace-snow

Posted

Hi there

Well done on this, it looks and functions well on my phone, and the code is nice to read and understandable, even when I don't know much React. Good job!

I only looked at the theme switcher component and can suggest a small change to make it fully accessible. At the moment, it doesn't communicate to assistive tech which theme is being activated. If you added an aria-label attribute to the button, you could use a ternary to update the label content. Something like ariaLabel={theme === "dark" ? "change to light mode" : "change to dark mode"}

Like I said, I don't do react, but I think that would work. There may be other places in your code that need similar, not sure.

Anyway, really good work again. Well done!

2

E.sa 300

@E-sa

Posted

Thank you for your feedback. About theme actually I didn't have any idea how to do it so I looked up on the internet and found that solution. Your idea is great I should change my theme switcher. :)

1
T
Chamu 13,110

@ChamuMutezva

Posted

Well done, most functionality are working well but I think the visual display still need a second look.

  • the border countries can be updated to read the full name of the country instead of an abbreviation.
  • take note also that some mobile phones automatically add an empty space at the end of a word when typing, that can be fixed by applying the trim method. Happy coding
1

E.sa 300

@E-sa

Posted

Hi, thank u for your feed back. about border countries you are right. in the Api i only saw abbreviation so I just used it that way. And great idea about trim. I didn't know about it. :)

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