Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: LayoutTests/accessibility/link-inside-button-accessible-text.html

Issue 829473004: When ARIA button contains a link, label text is ignored (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/accessibility/link-inside-button-accessible-text-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/accessibility/link-inside-button-accessible-text.html
diff --git a/LayoutTests/accessibility/link-inside-button-accessible-text.html b/LayoutTests/accessibility/link-inside-button-accessible-text.html
new file mode 100644
index 0000000000000000000000000000000000000000..eadb90499fb97e6c430b5426d691428ae67ec4db
--- /dev/null
+++ b/LayoutTests/accessibility/link-inside-button-accessible-text.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+</head>
+<body id="body">
+<div id="content">
+<div role="button" id="button1">
+ <a href="#">foo1</a>
+</div>
+<button id="button2">
+ <a href="#">foo2</a>
+</button>
+</div>
+<div id="console"></div>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ description("This tests that when a link is inside a button, its visible text is still available for the button.");
+ if (window.accessibilityController) {
+ var button1 = accessibilityController.accessibleElementById("button1");
+ shouldBe("button1.title", "'AXTitle: foo1'");
+ var button2 = accessibilityController.accessibleElementById("button2");
+ shouldBe("button2.title", "'AXTitle: foo2'");
+ document.getElementById("content").style.visibility = 'hidden';
+ }
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/accessibility/link-inside-button-accessible-text-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698