Design comparison
Solution retrospective
What can I do to improve it and please don't forget to give me your feedback :)
Community feedback
- @Aya-Saeed261Posted almost 2 years ago
Hey @JAHMD! congratulations on finishing the challenge π It looks great and there some features I'm thinking about stealing and using in my solutionπ
I have a couple of suggestions:
- Wrap the filter button (mode button and border countries buttons as well) between button tag instead of div tags, this way it will be more semantic and also accessible by keyboard so better accessibility
<button type="button" id="filter-btn">.</button>
- Bad value
Saint Lucia
for attributeid
on elementdiv
: An ID must not contain whitespace.: To fix this problem, replace whitespaces with hyphens.
cardContainer.id = country.name.common.replaceAll(" ", "-");
- Element
p
not allowed as child of elementbutton
in this context: To fix this problem, use a span tag instead of the p tag for the text in the back button.
Hope this helps, keep it up βοΈ
Marked as helpful1@JAHMDPosted almost 2 years ago@Aya-Saeed261 Hi Aya, glad that you like it and thank you so much for your comment and for your feedback , it really helped me.
1 - @denieldenPosted almost 2 years ago
Hello Ahmed, You have done a good work! π
Some little tips to improve your code:
- use
article
tag instead of a simplediv
to the container card for improve the Accessibility - add descriptive text in the
alt
attribute of the images not a simple flag for all - remove all unnecessary code, the less you write the better as well as being clearer: for example the
div
container of flag images - use
ul
element for the details text of country instead of multiplep
- I would also add a query reset button, I find it very convenient
Keep learning how to code with your amazing solutions to challenges.
Hope this help π and Happy coding!
Marked as helpful1@JAHMDPosted almost 2 years ago@denielden Hi Deniel, thank you so much for checking my solution and for your feedback. That was helpful!
1 - use
Please log in to post a comment
Log in with GitHubJoin 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