DEV Community

Discussion on: How to build a Modal

Collapse
supportic profile image
Supportic

This example raised some questions:

  1. Why do you wrap your listeners around functions?
  2. Why do you hide the H1 headline when the modal is covering it?
  3. Why do you declare the variable modal if its never used?

For future research:

  • try to make modals more accessible [ref]
  • Since your link "contact me" is rather an action than a link to something statically, the use of a button is prefered.