GNOME Bugzilla – Bug 414926
[pending] Orca should announce the level of headings in Firefox
Last modified: 2008-07-22 19:26:59 UTC
According to the Firefox spec: > The letters "h" and "Shift+h" will be used to move between headings. > When the heading is reached, orca will speak and braille the header followed > by "heading and the heading level. We've implemented H/Shift+H, but Orca is not currently announcing the level. Filing this as it as come up in recent discussion on the Orca list.
According to http://developer.mozilla.org/en/docs/Accessibility/ATSPI_Support, it looks like the attributes of a heading might contain some useful information for us: Supports Text interface<br /> <br /> Supports object attribute "level", see <a href="#obj-attr">object attributes</a> section *** The easiest way to solve this might be to add checks to Gecko.py:getUtterancesFromContents and Gecko.py:updateBraille to check for the heading role and then incorporate the level attribute if it exists (obj.attributes gets you the list of attributes).
Created attachment 84605 [details] [review] Patch for speech Here's a simple patch for speech. I'm not sure what to do about braille yet.
If this wouldn't be to much trouble putting "h" and then the number for the level at the end of the header line would be great.
Since we needed a GetHeadingLevel() for the new heading-by-level structural navigation, and since the functionality in the speech patch is quite helpful, I went ahead and checked in this patch. Braille to follow soon!
Created attachment 85876 [details] [review] patch to add braille This patch does exactly what Mike specified in his comment, namely: > If this wouldn't be to much trouble putting "h" and then the number for the > level at the end of the header line would be great. And, no, it wasn't any trouble at all. <smile> It did raise a couple of questions in my mind, however: 1. What, if anything, do we want to do w.r.t. localization? Should the "h" be translated so that it is the first letter of the language's word for "heading"? 2. Are their other roles besides links and headings for which additional information should be provided, be it the role itself or additional information such as the nesting level of a nested list? Thanks!!
Cool! Thanks! > 1. What, if anything, do we want to do w.r.t. localization? Should the "h" be > translated so that it is the first letter of the language's word for "heading"? Probably should do something like: # Translators: the 'h' below represents a heading level attribute for content # that you might find in something such as HTML content (e.g., <h1>). # The translated form is mean to be a single character followed by a numeric # heading level, where the single character is to indicate 'heading'. # regions.append(braille.Region(" " + + _("h%d" % level)))
Created attachment 86054 [details] [review] revised as per Will. Thanks Will. I checked this change in.
> Thanks Will. I checked this change in. Complete with typo ("mean to be" versus "meant to be"). D'Oh! Sorry about that. :-(
My bad for not noticing it. I fixed it when I was checking in all of the other changes to Gecko.py. :-)
This one looks good. I think it is safe to close.
Closing as FIXED. Thanks!