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

NFT card with expandable image using the dialog element

#accessibility

@JulioCinquina

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi, everyone! 👋🏻

This was a fun challenge in which I learned how to use the <dialog> element to create a modal. It takes care of most of the things that should be considered when implementing a modal:

  • Making the background inert while open
  • Focusing the first interactive element inside the modal after opening it
  • After closing the modal, returning focus to the element that was focused before opening it
  • Adding a backdrop
  • Being able to close it with the Esc key

Questions:

Any feedback, comments and suggestions are very welcome and appreciated. Thank you!

Community feedback

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