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

Unified Diff: LayoutTests/accessibility/presentation-owned-elements.html

Issue 1039873002: AX presentation role should be inherited to its required owned elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update Created 5 years, 9 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
Index: LayoutTests/accessibility/presentation-owned-elements.html
diff --git a/LayoutTests/accessibility/presentation-owned-elements.html b/LayoutTests/accessibility/presentation-owned-elements.html
new file mode 100644
index 0000000000000000000000000000000000000000..9587919a553606b1818801215bb9ec2b99e4f377
--- /dev/null
+++ b/LayoutTests/accessibility/presentation-owned-elements.html
@@ -0,0 +1,82 @@
+<script src="../resources/js-test.js"></script>
+<script src="../resources/accessibility-helper.js"></script>
+<div>These lists have a static text role because they have a presentation role.</div>
+<ul role="presentation">
+ <li>Presentation Item 1</li>
+ <li>Presentation Item 2</li>
+</ul>
+
+<div>The first list item has a listitem role even if ul has a presentation role because it has an explicit role.</div>
+<ul role="presentation">
+ <li role="listitem">Explicit Item 1</li>
+ <li>Implicit Item 2</li>
+</ul>
+
+<div>These two tables have static text roles because they have presentation roles.</div>
+<table role="presentation">
+ <thead>
+ <tr>
+ <th>Presentation th</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Presentation th</td>
+ </tr>
+ </tbody>
+</table>
+
+<table role="presentation">
+ <tr>
+ <th>Presentation th</th>
+ </tr>
+</table>
+
+<div>The "Presentation th" has a static text role because it has a presentation role.</div>
+<table>
+ <tr role="presentation">
+ <th>Presentation th</th>
+ </tr>
+ <tr>
+ <td>Normal td</td>
+ </tr>
+</table>
+
+<div>The row for "Explicit th" has a row role even if table has a presentation role because it has an explicit role.</div>
+<table role="presentation">
+ <tr role="row">
+ <th>Explicit th</th>
+ </tr>
+ <tr>
+ <td>Implicit td</td>
+ </tr>
+</table>
+
+<div>The menu items except button have a static text role because it has a presentation role and is disabled.<br>
+Button has a button role because it has an explicit role.</div>
+<menu type="context" role="presentation">
+<input type="checkbox" name="vehicle" value="Bike" disabled> I have a bike
+<input type="button" role="button" value="Click me" disabled>
+<input type="radio" name="gender" value="male" disabled> Male
+<input type="radio" name="gender" value="female" disabled> Female
+</menu>
+
+<div>The option A has a static text role because it has a presentation role and is disabled.<br>
+The option B has option role because it has an explicit role.</div>
+<select multiple role="presentation" disabled>
+ <option value="A" disabled>A</option>
+ <option value="B" disabled role="option">B</option>
+</select>
+
+<p>End of test</p>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("This test make sure that presentation role is inherited to required owned elements.");
+
+if (window.testRunner)
+ testRunner.dumpAsText();
+if (window.accessibilityController) {
+ buildAccessibilityTree(accessibilityController.focusedElement, 0, 1);
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698