[orca] Implement the "list of" dialog for ARIA landmarks



commit 836676da8f292cff6d19be4a985e71fc7659358b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Sep 30 06:46:43 2013 -0400

    Implement the "list of" dialog for ARIA landmarks

 src/orca/cmdnames.py              |    5 +++++
 src/orca/guilabels.py             |   15 +++++++++++++++
 src/orca/structural_navigation.py |   11 +++++++++++
 3 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/cmdnames.py b/src/orca/cmdnames.py
index 0903241..bb38573 100644
--- a/src/orca/cmdnames.py
+++ b/src/orca/cmdnames.py
@@ -829,6 +829,11 @@ LANDMARK_PREV = _("Goes to previous landmark.")
 # important part of webpage like banners, main context, search etc.
 LANDMARK_NEXT = _("Goes to next landmark.")
 
+# Translators: this is for navigating among ARIA landmarks in a document. ARIA
+# role landmarks are the W3C defined HTML tag attribute 'role' used to identify
+# important part of webpage like banners, main context, search etc.
+LANDMARK_LIST = _("Displays a list of large objects.")
+
 # Translators: this is for navigating among large objects in a document.
 # A 'large object' is a logical chunk of text, such as a paragraph, a list,
 # a table, etc.
diff --git a/src/orca/guilabels.py b/src/orca/guilabels.py
index fcfbe96..c262a0e 100644
--- a/src/orca/guilabels.py
+++ b/src/orca/guilabels.py
@@ -403,6 +403,14 @@ SN_HEADER_LABEL = C_("structural navigation", "Label")
 
 # Translators: Orca has a command that presents a list of structural navigation
 # objects in a dialog box so that users can navigate more quickly than they
+# could with native keyboard navigation. This is the title for a column which
+# contains the text of a landmark. ARIA role landmarks are the W3C defined HTML
+# tag attribute 'role' used to identify important part of webpage like banners,
+# main context, search etc.
+SN_HEADER_LANDMARK = C_("structural navigation", "Landmark")
+
+# Translators: Orca has a command that presents a list of structural navigation
+# objects in a dialog box so that users can navigate more quickly than they
 # could with native keyboard navigation. This is the title of a column which
 # contains the level of a heading. Level will be a "1" for <h1>, a "2" for <h2>,
 # and so on.
@@ -526,6 +534,13 @@ SN_TITLE_HEADING_AT_LEVEL = C_("structural navigation", "Headings at Level %d")
 # Translators: Orca has a command that presents a list of structural navigation
 # objects in a dialog box so that users can navigate more quickly than they
 # could with native keyboard navigation. This is the title of such a dialog box.
+# ARIA role landmarks are the W3C defined HTML tag attribute 'role' used to
+# identify important part of webpage like banners, main context, search etc.
+SN_TITLE_LANDMARK = C_("structural navigation", "Landmarks")
+
+# Translators: Orca has a command that presents a list of structural navigation
+# objects in a dialog box so that users can navigate more quickly than they
+# could with native keyboard navigation. This is the title of such a dialog box.
 # A 'large object' is a logical chunk of text, such as a paragraph, a list,
 # a table, etc.
 SN_TITLE_LARGE_OBJECT = C_("structural navigation", "Large Objects")
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index a7480d9..f5c5204 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -2626,6 +2626,9 @@ class StructuralNavigation:
 
         nextDesc = cmdnames.LANDMARK_NEXT
         bindings["next"] = ["m", settings.NO_MODIFIER_MASK, nextDesc]
+
+        listDesc = cmdnames.LANDMARK_LIST
+        bindings["list"] = ["m", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _landmarkCriteria(self, collection, arg=None):
@@ -2695,6 +2698,14 @@ class StructuralNavigation:
             brief = messages.STRUCTURAL_NAVIGATION_NOT_FOUND
             self._script.presentMessage(full, brief)
 
+    def _landmarkDialogData(self):
+        columnHeaders = [guilabels.SN_HEADER_LANDMARK]
+
+        def rowData(obj):
+            return [self._getText(obj)]
+
+        return guilabels.SN_TITLE_LANDMARK, columnHeaders, rowData
+
     ########################
     #                      #
     # Lists                #


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