https://bugs.documentfoundation.org/show_bug.cgi?id=161444

            Bug ID: 161444
           Summary: When switching sheets, newly-focused sheet should fire
                    object:state-changed:focused prior to
                    object:active-descendant-changed
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 36549

Steps to reproduce:

1. Launch Orca
2. Launch Calc and create a second sheet
3. Use Ctrl+PageUp/Ctrl+PageDown to switch sheets

Expected results: Orca would announce the name of the sheet before announcing
the selected cell.

Actual results: Orca just announces the selected cell.

>From debugging things on the Orca side, it looks like the following is taking
place when moving from Sheet 1 to Sheet 2:

1. The document fires object:children-changed:remove for Sheet 1
2. The document fires object:children-changed:add for Sheet 2
3. Sheet 2 fires object:active-descendant-changed for the selected cell

When Orca goes to present the new focus/object of interest, it always looks for
the new ancestors so that it can give context to the user about their new
location.

In the case described in this issue, Orca checks for the common ancestors
between the old focus (cell selected on Sheet 1) and the new focus (cell
selected on sheet 2). This fails because Sheet 1 is being (has been?)
destroyed.

Orca doesn't want to be too chatty and speak the sheet, and the document, and
the root pane, and the window, so it doesn't speak any ancestors in this case.
Instead it just announces the new active descendant.

I potentially could handle this situation in Orca. HOWEVER, Orca already has
similar code in its web support for recovery from destroyed object. And those
heuristics have a tendency to get things wrong, which leads to more heuristics,
which leads to new things being wrong, .... :( I really don't want to add more
fragile heuristics to Orca if it can be avoided.

ALSO: What is functionally taking place is that Sheet 2 gains focus. So I don't
think it would be a hack for Sheet 2 to fire object:state-changed:focused prior
to firing active-descendant change.

Related aside: I've noticed that Orca recently only announces the root pane
when Calc is initially launched. I've not yet debugged to see whether that's an
Orca change or a Calc change. But, if the active sheet fired
object:state-changed:focused upon launch of Calc, I believe it would also solve
that issue.

Michael: Thoughts?


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=36549
[Bug 36549] [META] ACCESSIBILITY: Tracking bug for issues affecting a11y ATK
and GNOME Orca screen reader support
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to