Apache OpenOffice (AOO) Bugzilla – Issue 87426
[a11y] Spell Checking dialog has broken accessibility component hierarchy.
Last modified: 2009-07-20 14:53:07 UTC
See also Orca bug #523452, which is blocked by this issue: http://bugzilla.gnome.org/show_bug.cgi?id=523452 Steps to reproduce: 1/ Start Orca 2/ Start oowriter 2.4-dev (RC6) 3/ Type in some misspelled text such as: "The quuuuuick brown fox" 4/ Press Control-Home to get the text cursor to the beginning of the document. 5/ Press F7 to bring up the spell checking dialog. 6/ Look at the accessible component hierarchy of the object that has focus using either Orca's Control-Alt-Insert-Page_Up functionality or via accerciser. The expected hierarchy at this point is: ROLE_PUSH_BUTTON, ROLE_OPTION_PANE, ROLE_DIALOG, ROLE_APPLICATION What we find instead is: ROLE_PUSH_BUTTON, ROLE_DIALOG, ROLE_APPLICATION In fact, if we use Orca's Control-Alt-Insert-Page_Down functionality to show the whole of the spell checking dialog, we just get: +- app.name='soffice' name='Spellcheck: (English (USA))' role='dialog' state='active enabled sensitive showing visible' relations='' +- app.name='soffice' name='Not in dictionary' role='label' state='enabled sensitive showing visible' relations='label for' This is very broken. Because of this, we can't correct navigate the spell checking dialog components to add smarts to help the blind user when they are trying to do spell checking.
@OBR: as discussed, this is not he only dialog showing to view info. See also: - Insert - Hyperlink - Edit - Find & Replace My first assumption, this only concerns non modal dialog was wrong: - File - Wizards: modal and not accessible - Edit - ImageMap: non modal but accessible Pleas tell me if we need to split this. Raising priority and targetting 3.0
I don't think we need separate issues for each dialog.
*** Issue 88667 has been marked as a duplicate of this issue. ***
I have identified the fix for issue 78117 as the root cause of this problem.
Fix committed in CWS uaa06.
The object that used to havethe role OPTION_PANE now has the role FILLER. Let me know if this a problem for Orca. @ES: please verify.
It shouldn't be a problem but it will need a slight change in Orca to (potentially) get it working again. If you are using the latest Orca from SVN trunk, then the code is in .../orca/src/orca/scripts/apps/soffice/script.py At about line 1233, you will find the following piece of code: # 2) Writer: spell checking dialog. # # Check to see if the Spell Check dialog has just appeared and got # focus. If it has, then speak/braille the current misspelt word # plus its context. # # Note that in order to make sure that this focus event is for the # spell check dialog, a check is made of the localized name of the # option pane. Translators for other locales will need to ensure that # their translation of this string matches what StarOffice uses in # that locale. rolesList = [pyatspi.ROLE_PUSH_BUTTON, \ pyatspi.ROLE_OPTION_PANE, \ pyatspi.ROLE_DIALOG, \ pyatspi.ROLE_APPLICATION] if self.isDesiredFocusedItem(event.source, rolesList): pane = event.source.parent # Translators: this is what the name of spell checking # window in StarOffice begins with. The translated form # has to match what StarOffice/OpenOffice is using. We # hate keying off stuff like this, but we're forced to do # so in this case. # if pane.name.startswith(_("Spellcheck:")): debug.println(self.debugLevel, "StarOffice.locusOfFocusChanged - " \ + "Writer: spell check dialog.") self.readMisspeltWord(event, pane) # Fall-thru to process the event with the default handler. If I'm understanding you correctly, you are saying the component hierarchy is now: push button filler dialog application when the spell check dialog is initially displayed. If so, then we'll need to change pyatspi.ROLE_OPTION_PANE, \ for pyatspi.ROLE_FILLER, \ Any chance one of your engineers or testers can try this before you close out the bug? Thanks.
I just tried the OOo_3.0.0_080514_unxlngi6_install.tar.gz that obr pointed me at. I made the simple to orca/scripts/apps/soffice/script.py as described in a previous comment. Unfortunately it still isn't always working. Reopening. See commentary below and the attached Orca debug log. I then started up swriter and Orca. I typed the following line into swriter: The quuuick boooown fox jumpps over the lazzzzy dog. * Press F7. The spell check dialog came up. Orca looks for the component hierarchy: +- app.name='soffice' name='soffice' role='application' state='' relations='' +- app.name='soffice' name='Spellcheck: (English (USA))' role='dialog' state='active enabled sensitive showing visible' relations='' +- app.name='soffice' name='Spellcheck: (English (USA))' role='filler' state='active enabled sensitive showing visible' relations='' +- app.name='soffice' name='Change' role='push button' state='enabled focusable focused sensitive showing visible' relations='' and finds it (line 1041 in the attached debug.out). * Press Esc to dismiss the dialog. * Press F7 to bring up the spell check dialog again. Orca again looks for the component hierarchy, but this time gets: +- app.name='soffice' name='soffice' role='application' state='' relations='' +- app.name='soffice' name='Untitled 1 - OpenOffice.org Writer Beta' role='frame' state='enabled resizable sensitive showing visible' relations='' and therefore fails (line 1969 in the debug.out).
Created attachment 53672 [details] Orca debug log generated whilst testing this problem.
Hmm, if I read the log correctly, line 1969 of the log is the result of the window-deactivate message the document frame sends. The "state-changed:focused" event, that triggered orca the first time, is in line 2081 (and line 2082 claims that Orca has found the spell check dialog hierarchy). Reassign to me until issue is confirmed to be resolved.
Changing the role FILLER back to OPTION_PANE was easier than expected, so committed the change and rebuild. Accerciser show the correct hierarchy even if the spell check dialog gets opened/closed multiple times, so I wonder what exactly did go wrong for you.
> Hmm, if I read the log correctly, line 1969 of the log is the result > of the window-deactivate message the > document frame sends. The "state-changed:focused" event, that triggered > orca the first time, is in line 2081 (and line 2082 claims that Orca has > found the spell check dialog hierarchy). Yes you are correct. Sorry about that. Lack of sleep is my only excuse. What's happening the second time (for some unknown reason), was that Orca was failing to recognize that there was (still) misspelt words, even though the accessible component hierarchy is correct. I've now looked at that a little deeper. It was failing to say something the second time because there is a chunk of code in the readMisspeltWord() method in .../soffice/script.py (about line 923) that goes: # Note that we often get two or more of these focus or property-change # events each time there is a new misspelt word. We extract the # length of the line of text, the misspelt word, the start and end # offsets for that word and compare them against the values saved # from the last time this routine was called. If they are the same # then we ignore it. debug.println(self.debugLevel, \ "StarOffice.readMisspeltWord: type=%s word=%s(%d,%d) len=%d" % \ (event.type, badWord, startOff, endOff, textLength)) if (textLength == self.lastTextLength) and \ (badWord == self.lastBadWord) and \ (startOff == self.lastStartOff) and \ (endOff == self.lastEndOff): return If I comment out that if statement and the return, we nicely hear the misspelt word context again. So, it should it looks like you've nicely fixed the problem. I haven't retried with the new (OPTION_PANE) version. Will, could you try that one please? The only change you should need to make to the .../soffice/script.py file is the commenting out of that if statement and the return (about line 934). Thanks.
Please note that a move from OPTION_PANE to FILLER would affect all dialogs, so all role checks in Orca would have to be adapted.
@es: Please verify the spell check dialog and others do have a sane a11y hierarchy again (including OPTION_PANE and all buttons).
The hierarchy of the mentioned dialog is now completely visible in accerciser.
verified in OOO310m9 - can be closed
This issue is closed automatically and wasn't rechecked in a current version of OOo. The fixed issue should be integrated in OOo since more than half a year. If you think this issue isn't fixed in a current version (OOo 3.1), please reopen it and change the field 'Target Milestone' accordingly. If you want to download a current version of OOo => http://download.openoffice.org/index.html If you want to know more about the handling of fixed/verified issues => http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues