GNOME Bugzilla – Bug 418430
Empty sections should be treated as layout objects in Firefox
Last modified: 2007-03-15 17:41:26 UTC
Some web pages use <div></div> in such a way that a line's contents consist solely of an empty section. On such pages, go{Next, Previous}Line() will stop at that empty section. Orca then speaks nothing and displays empty cells in braille. Test case: 1 .Navigate to http://www.sun.com. 2. Press Tab once to move focus to the "Skip to content" link 3. Use Down Arrow to navigate through the items at the top of the page. Actual results: Periodically, pressing Down Arrow seemingly has no effect. Expected results: EITHER 1. Orca would say something to indicate that an empty section had focus, OR 2. Orca would not stop at that empty section. (Preferred)
Created attachment 84624 [details] [review] patch to hopefully solve the problem This patch adds rolenames.ROLE_SECTION to the list of roles in isUselessObject(). I tried it out on sun.com. No content "went missing." While there are still a couple of cases where pressing Down Arrow still results in silence, this patch reduces the frequency significantly. It also causes most of the navbar items which are visually on a single line (downloads, services & solutions, support, training, developer) to be treated as such, whereas without the patch they are treated as if they are all on separate lines.
Cool! this will make this page navigate much nicer. Thanks a lot Joanie
The only thing I wonder about is: How much content if any will we now skip that we don't want to when moving by object with "o" and "shift+o"
> The only thing I wonder about is: How much content if any will we now skip > that we don't want to when moving by object with "o" and "shift+o" I would *think* none. O and Shift+O call goNextChunk() and goPreviousChunk() respectively. go{Next, Previous}Chunk searches for the next instance of an item whose role is in the OBJECT_ROLES list. There are a lot of things in that list, but rolenames.ROLE_SECTION is not one of them. <smile> All of this said, are you finding that with the patch content is being skipped over and without the patch it is not? If so, give me specifics and I'll see what I can figure out. Thanks!!
To follow up, Mike: I should probably clarify something. I had said: >This patch adds rolenames.ROLE_SECTION to the list of roles in > isUselessObject(). That rather makes it sound like now sections are useless period, and that's not the case. isUselessObject() deems something useless if it has a particular role (like image or table cell) *and* if there's no text displayed for that item *and* if there's no label displayed for that item *and* if that item not inside of a link.
This seems like a good fix to me. I say go ahead and commit and mark as FIXED. :-)
Thanks! Done.