summaryrefslogtreecommitdiff
path: root/sc/source/ui/Accessibility
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-09-13 12:02:28 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-09-13 17:03:22 +0200
commit366dec115e3805e50071c39da2cf847b99aa8f7a (patch)
tree98ea3de0269a9e10d27908aad78267ef4bec5a79 /sc/source/ui/Accessibility
parent15e238757a5f0bd0076eda7046ceddfc5d4db284 (diff)
tdf#161444 sc a11y: Send focused event when switching sheets
When switching to another spreadsheet table in Calc (e.g. using Ctrl+Tab or Ctrl+PageUp), send an `AccessibleEventId::STATE_CHANGED` for the `FOCUSED` state of the newly active/focused sheet before sending an `ACTIVE_DESCENDANT_CHANGED` event for the currently active cell in that sheet. Call `ScAccessibleSpreadsheet::GotFocus` instead of `ScAccessibleSpreadsheet::FireFirstCellFocus` to achieve that, which takes care of both events. With that in place, the corresponding events when using the gtk3 VCL plugin now are shown as expected in Accerciser's event monitor: 86.3 object:children-changed:remove(0, 0, [table | Sheet Sheet2]) source: [document spreadsheet | Untitled 1 - LibreOfficeDev Spreadsheets] application: [application | soffice] 86.3 object:children-changed:add(0, 0, [table | Sheet Sheet3]) source: [document spreadsheet | Untitled 1 - LibreOfficeDev Spreadsheets] application: [application | soffice] 86.3 object:state-changed:focused(1, 0, 0) source: [table | Sheet Sheet3] application: [application | soffice] 86.3 object:active-descendant-changed(212998, 0, [table cell | G14]) source: [table | Sheet Sheet3] application: [application | soffice] This however still doesn't make Orca as of commit 6f6e0f79ff5d8669591c7c19ecdaca5ec45ab67d, i.e. the commit prior to the Orca-side workaround [1] commit 4ead75fdaebdde60535cfbadca108ccaeeeb9401 Author: Joanmarie Diggs <jdiggs@igalia.com> Date: Thu Sep 12 19:56:48 2024 +0200 Hack around https://bugs.documentfoundation.org/show_bug.cgi?id=161444 Because removing workarounds is regressing the end user experience, add the following hack: When we receive an active descendant event from LO, and the event source is not an ancestor of the current focus: 1. Silently set the locus of focus to the parent of the event source. Otherwise we'll be super chatty in response to the next item. 2. Non-silently set the locus of focus to the event source. This will cause us to present the sheet name. 3. Allow the default script to do its thing which will set the locus of focus to the cell with the common ancestor being the table and thus it will not be double-spoken. speak the newly active sheet before announcing the cell, but still requires further changes on Orca side, s. discussion in tdf#161444 and attached Orca diff there. [1] https://gitlab.gnome.org/GNOME/orca/-/commit/4ead75fdaebdde60535cfbadca108ccaeeeb9401 Change-Id: I699258ba395dd212fa45c7d1546b26a7c241db97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173331 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/Accessibility')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocument.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 38d0665d97c7..4603df711de2 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1485,7 +1485,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
CommitChange(aEvent); // all children changed
if (mpAccessibleSpreadsheet.is())
- mpAccessibleSpreadsheet->FireFirstCellFocus();
+ mpAccessibleSpreadsheet->GotFocus();
}
}
else if (rHint.GetId() == SfxHintId::ScAccMakeDrawLayer)