I had a really good discussion with Derek Featherstone about accessible modal dialogs. He suggested going with jQuery UI's Dialog, but with the following steps:
-
Inject the content right beside the activating button, this allows keyboard users to quickly get inside the modal.
-
Make sure the activating item is an anchor tag, and targets the id of the modal div, so the focus is placed on it.
-
Give the modal div a tabindex="-1" so that it can be focused via the link, but not accidentally tabbed into.
-
Give modal div an ARIA tag of aria-labelledby="ID", where ID is the id of the header tag contained on the modal div.