Submitted over 2 years ago
Random advice using fetch and json API's
@alexvillhen
Design comparison
SolutionDesign
Solution retrospective
On this project I put more focus on the API so if you see some way to improve my JS code I'd love to read it 😁
Community feedback
- @fazzaamiarsoPosted over 2 years ago
Hello Alejandro! You definitely nailed the API implementation. Great work!
There are some accessibility issues that can be improved.
- You should wrap the attribution
div
on a<footer>
tag. So, it's wrapped in a landmark and accessible. - You must have an
h1
element so screen reader users can be informed about the page's purpose. In your case, you can implement a visually hiddenh1
by adding this CSS class.
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
- Your image button better replaced with this implementation for accessibility.
<input type="image" src="./images/icon-dice.svg" alt="Generate advice" />
Please refer to this docs.
Hope it helps! Keep on learning!
Marked as helpful0@alexvillhenPosted over 2 years ago@fazzaamiarso wooow, thaks a lot! I've never used the input tag like that, this is really helpful, thksss
0 - You should wrap the attribution
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