summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorOlli Tietäväinen <ollit@vaadin.com>2018-01-09 15:36:55 +0200
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-01-09 15:36:55 +0200
commit4a58876ee5bd0f599db343bf40ffef06c2e5eaba (patch)
tree2ef0af6b422d513384dbaa49481a4ea2199a132b /uitest
parent59a2dafdcb1333b278484bdd65b3ca3cc7bb87f8 (diff)
downloadvaadin-framework-4a58876ee5bd0f599db343bf40ffef06c2e5eaba.tar.gz
vaadin-framework-4a58876ee5bd0f599db343bf40ffef06c2e5eaba.zip
Add aria-modal attribute and role='dialog' for modal Window (#10447)
Fixes #10424
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java b/uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java
index b01a9ded14..8cbb9d6ae9 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/window/ModalWindowFocusTest.java
@@ -15,6 +15,7 @@
*/
package com.vaadin.tests.components.window;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
@@ -91,6 +92,21 @@ public class ModalWindowFocusTest extends MultiBrowserTest {
}
+ @Test
+ public void verifyAriaModalAndRoleAttributes() {
+ waitForElementPresent(By.id("firstButton"));
+ WebElement button = findElement(By.id("firstButton"));
+ button.click();
+
+ waitForElementPresent(By.className("v-window"));
+ WebElement windowElement = findElement(By.className("v-window"));
+ String ariaModal = windowElement.getAttribute("aria-modal");
+ assertEquals("true", ariaModal);
+ String role = windowElement.getAttribute("role");
+ assertEquals("dialog", role);
+
+ }
+
private void pressEscAndWait() {
new Actions(driver).sendKeys(Keys.ESCAPE).build().perform();
sleep(100);