From a48bbc9aac8ea3da43fc2838e00bac4732a3a549 Mon Sep 17 00:00:00 2001 From: Valdrin Koshi Date: Mon, 27 Jun 2016 23:16:55 +0200 Subject: [PATCH] remove aria-modal (#96) --- paper-dialog-behavior.html | 8 +------- test/paper-dialog-behavior.html | 10 ---------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/paper-dialog-behavior.html b/paper-dialog-behavior.html index 5fa7efe..6b45ddd 100644 --- a/paper-dialog-behavior.html +++ b/paper-dialog-behavior.html @@ -41,7 +41,7 @@

Header

This element has `role="dialog"` by default. Depending on the context, it may be more appropriate to override this attribute with `role="alertdialog"`. -If `modal` is set, the element will set `aria-modal` and prevent the focus from exiting the element. +If `modal` is set, the element will prevent the focus from exiting the element. It will also ensure that focus remains in the dialog. @hero hero.svg @@ -84,12 +84,6 @@

Header

}, _modalChanged: function(modal, readied) { - if (modal) { - this.setAttribute('aria-modal', 'true'); - } else { - this.setAttribute('aria-modal', 'false'); - } - // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop. // We need to wait for the element to be ready before we can read the // properties values. diff --git a/test/paper-dialog-behavior.html b/test/paper-dialog-behavior.html index 857a3d3..d7c260e 100644 --- a/test/paper-dialog-behavior.html +++ b/test/paper-dialog-behavior.html @@ -400,16 +400,6 @@ assert.equal(dialog.getAttribute('role'), 'dialog', 'has role="dialog"'); }); - test('dialog has aria-modal=false', function() { - var dialog = fixture('basic'); - assert.equal(dialog.getAttribute('aria-modal'), 'false', 'has aria-modal="false"'); - }); - - test('modal dialog has aria-modal=true', function() { - var dialog = fixture('modal'); - assert.equal(dialog.getAttribute('aria-modal'), 'true', 'has aria-modal="true"'); - }); - });