GNOME Bugzilla – Bug 469686
Sanity check needed in gecko.getHeadingLevel/getNodeLevel
Last modified: 2007-08-30 17:22:41 UTC
gecko.getHeadingLevel() and gecko.getNodeLevel() do not check for cases where obj.attributes is None. As a result, there is no output when obj.attributes is None. http://www.brailcom.org/~pdm/test.xul illustrates the problem. I am certain that this fix needs to go in, but I am confused as to why I am getting no attributes. According to Accerciser, each of the four objects on the test page has a object. Is Firefox recreating an object for us? There are also other problems with this page, but I have not identified the source of the problem(s) yet. Some peculiarities with the page include the second label not being output and the buttons not implementing IText. Patch for this problem to follow soon.
Created attachment 94211 [details] [review] first version of Sanity check needed in gecko.getHeadingLevel/getNodeLevel first patch
Created attachment 94214 [details] [review] second patch for Sanity check needed in gecko.getHeadingLevel/getNodeLevel This second patch also tests if the object is None. This is a test that certainly should be in place, but why is it needed?
Looking at orca.py's setLocusOfFocus(), it seems we do some checks and set the old and/or new locusOfFocus to None: oldLocusOfFocus = orca_state.locusOfFocus if oldLocusOfFocus and not oldLocusOfFocus.valid: oldLocusOfFocus = None orca_state.locusOfFocus = obj if orca_state.locusOfFocus and not orca_state.locusOfFocus.valid: orca_state.locusOfFocus = None Not sure why the obj.valid is failing though -- assuming it's failing there and not somewhere else. (Haven't actually debugged anything; merely looking at the code).
I believe one of the problems with this test page is due to 'document frame' being an 'embedded component'. A new bug is posted here http://bugzilla.gnome.org/show_bug.cgi?id=469718
This patch looks good, and we've noticed the problem in bug 462883. Please commit to gnome-2-20 branch and trunk.
Committed to both trunk and gnome-2-20. Please note that getNodeLevel() was an ARIA only addition so the getNodeLevel() fix only appears in trunk.