[orca] Don't generate ancestors beyond MathML math element



commit e964a58466ffcca58a3ecaf3d700ee86f23f3a72
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Aug 3 16:17:36 2015 -0400

    Don't generate ancestors beyond MathML math element

 src/orca/scripts/web/speech_generator.py           |    1 +
 test/html/math-in-aria-dialog.html                 |    8 +++
 .../firefox/math_line_nav_math_in_dialog.params    |    1 +
 .../firefox/math_line_nav_math_in_dialog.py        |   49 ++++++++++++++++++++
 4 files changed, 59 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index ac056db..b20cae2 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -61,6 +61,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
                                pyatspi.ROLE_EMBEDDED,
                                pyatspi.ROLE_INTERNAL_FRAME,
                                pyatspi.ROLE_FORM,
+                               pyatspi.ROLE_MATH,
                                pyatspi.ROLE_MENU_BAR,
                                pyatspi.ROLE_TOOL_BAR]
         args['skipRoles'] = [pyatspi.ROLE_PARAGRAPH,
diff --git a/test/html/math-in-aria-dialog.html b/test/html/math-in-aria-dialog.html
new file mode 100644
index 0000000..ade7855
--- /dev/null
+++ b/test/html/math-in-aria-dialog.html
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+<div>Line 1</div>
+<div role="dialog"><math><mn>2</mn></math></div>
+<div>Line 3</div>
+</body>
+</html>
diff --git a/test/keystrokes/firefox/math_line_nav_math_in_dialog.params 
b/test/keystrokes/firefox/math_line_nav_math_in_dialog.params
new file mode 100644
index 0000000..7f50436
--- /dev/null
+++ b/test/keystrokes/firefox/math_line_nav_math_in_dialog.params
@@ -0,0 +1 @@
+PARAMS=$TEST_DIR/../../html/math-in-aria-dialog.html
diff --git a/test/keystrokes/firefox/math_line_nav_math_in_dialog.py 
b/test/keystrokes/firefox/math_line_nav_math_in_dialog.py
new file mode 100644
index 0000000..98d0b16
--- /dev/null
+++ b/test/keystrokes/firefox/math_line_nav_math_in_dialog.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "1. Top of file",
+    ["BRAILLE LINE:  'Line 1'",
+     "     VISIBLE:  'Line 1', cursor=1",
+     "SPEECH OUTPUT: 'Line 1'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "2. Line Down",
+    ["BRAILLE LINE:  'math'",
+     "     VISIBLE:  'math', cursor=0",
+     "SPEECH OUTPUT: '2'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Down"))
+sequence.append(utils.AssertPresentationAction(
+    "3. Line Down",
+    ["BRAILLE LINE:  'Line 3'",
+     "     VISIBLE:  'Line 3', cursor=1",
+     "SPEECH OUTPUT: 'Line 3'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "4. Line Up",
+    ["BRAILLE LINE:  'math'",
+     "     VISIBLE:  'math', cursor=0",
+     "SPEECH OUTPUT: '2'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("Up"))
+sequence.append(utils.AssertPresentationAction(
+    "5. Line Up",
+    ["BRAILLE LINE:  'Line 1'",
+     "     VISIBLE:  'Line 1', cursor=1",
+     "SPEECH OUTPUT: 'Line 1'"]))
+
+sequence.append(utils.AssertionSummaryAction())
+sequence.start()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]