Modal dialog

WIP

Few things to keep in mind :

  • If the modal is not open, it should not be rendered in the DOM
  • Try to set the modal at the and of body. If you are using React you can use React Portal to append the modal to the end of body
  • Go over the WAI-ARIA attrubutes
  • If the user presses the escape button while the modal is ope, it closes it
  • Clicking outside the modal, closes the modal.
  • When the user opens the modal, the user can't scroll
  • When the user opens the modal the focus goes straight to the modal's close button?
  • Focus stays within the modal while the modal is open. That means the user can't tab pass the modal window to the body.