accessible-modal-dialog
accessible-modal-dialog copied to clipboard
Set focus to modal usage instructions
When the modal is displayed to the screen, the focus should be placed at the top of the modal content. Rather than first field as is does with JAWS 14.
I'll look at this some. As for where to set the focus, I was following the W3C recommendations.
http://www.w3.org/TR/wai-aria-practices/#modal_dialog
"When the dialog box is opened, focus should be set to the first tab focusable element within the dialog. If there is no tab focusable element within the dialog box contents, set the focus to the item that is used to cancel or close the dialog."
I haven't tested screen reader compatibility on this for a while, but doing this, at least in the past, had cause the screen reader to announce the description. I'll double check how all of the screen readers are currently handling this.