Skip to content

New and improved script version#11

Description

@KittyGiraudel

Hey I took the liberty to make a new version for the script including the following features:

  • no more jQuery dependency 馃帀
  • possibility to have several different modals on the page
  • DOM API for openers (data-show-modal="modal-id") / closers (data-hide-modal)
  • JS API to manually show and hide the modal (modal.show(), modal.hide())
  • JS API to know whether it鈥檚 hidden or shown (modal.shown)
  • Addition of [tabindex]:not([value="-1"]) to focusable elements
  • Cleaner code

Find the code here: https://github.com/edenspiekermann/accessible-modal-dialog.
Find a demo here: http://codepen.io/HugoGiraudel/pen/jWQqeq?editors=0100.

Would you like me to submit a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions