From 9b4969aad69b834999d90dd75ca9fac7d0161308 Mon Sep 17 00:00:00 2001 From: Troy Morehouse Date: Tue, 18 Apr 2017 21:35:29 -0300 Subject: [PATCH 1/5] Added closeOnEsc, hideHeaderClose & enforceFocus Added option for disabling close on ESC (prop: closeOnEsc, defaults to true) and switched to using @keyup.esc handler. Added option to hide header close button (prop: hideHeaderClose, defaults to false) Added in the enforceFocus handler to make sure focus never leaves dialog while it is open. This provides better ARIA compliance as some screen readers (and browsers) will let you tab through document even though a dialog is open. Also added aria-labeledby and aria-describedby attributes, as well as switched the modal header and footer to semantic elements for better ARIA accessibility. --- lib/components/modal.vue | 67 ++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/lib/components/modal.vue b/lib/components/modal.vue index 3e40cfbde62..1ddb6537055 100755 --- a/lib/components/modal.vue +++ b/lib/components/modal.vue @@ -11,33 +11,47 @@
-