appility / moda11y

An accessible modal, configurable.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

moda11y

An accessible modal.

Installation

npm install moda11y

Usage

It will attach it's behaviour to any element with the data-modal attribute.
It's recommended that you use a focusable element.
<button data-modal data-target="modal1">Show me the modal!</button>

data-modal (required) data-target (required)

//data-title //data-text //data-text-ok-button //data-text-cancel-button

'use strict';

If you want to have a button close the modal just 
add the attribute [data-close] to any focusable element
e.g. a or button

See example/app.js

'use strict';

You will need to have a modal shade present on the page

I'm not maintaining this anymore

License

MIT

About

An accessible modal, configurable.

License:MIT License