accessible_modal_window
accessible_modal_window copied to clipboard
Adds `refresh` method to re-fetch `[data-modal]`
See #6 for more information.
I know this isn't the best solution, but I'm not a great JS developer.
Another alternative would be to add something like this:
/**
* @param {Element} item
*/
ARIAmodal.addModal = function ( item ) {
modal.push( item );
};
and then refactor setupModal
so it runs only on one modal at a time, then add a new setupModals
method that would loop through all the items in the modal
array and run setupModal
on them.
Again, I'm not great at JS. Thank you for the script, and please let me know if I can help with the PR.
Closes #6