Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibreOffice Calc: Incorrect cell coordinates announced when cell coordinate announcement is disabled #15098

Closed
michaelweghorn opened this issue Jul 4, 2023 · 0 comments · Fixed by #15099
Milestone

Comments

@michaelweghorn
Copy link
Contributor

(This was originally reported on LibreOffice's accessibility mailing list. First mail in the thread: https://listarchives.libreoffice.org/global/accessibility/msg01031.html )

Steps to reproduce:

  1. Disable announcement of cell coordinates in NVDA's settings: under "Document Formatting" -> group "Table information", uncheck the "Cell coordinates" checkbox
  2. start LibreOffice Calc with a fresh document
  3. press the arrow right key a few times and check what NVDA announces (wait a few seconds in between)

Actual behavior:

  • When moving to cell C1, NVDA says "B1", when moving to cell D1, NVDA says "C1", etc. That means, the coordinates of the previously focused cell are announced.

From NVDA's speech viewer output:

Untitled 1 - LibreOffice Calc
Untitled 1 - LibreOffice Spreadsheets  document  editable
Sheet Sheet1  table  editable
right arrow
right arrow
B1
right arrow
C1
right arrow
D1

Expected behavior:

Cell coordinates should not be announced at all when this is disabled. (And if coordinates are announced, they should be the correct ones of the newly focused cell, not of the previous one.)

NVDA logs, crash dumps and other attachments:

n/a

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

2023.1 (2023.1.0.27913)

Windows version:

Windows 10

Name and version of other software in use when reproducing the issue:

LibreOffice 7.5.3.2

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Yes, git master (as of 8accbfa) built from source

If NVDA add-ons are disabled, is your problem still occurring?

n/a

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

n/a

michaelweghorn added a commit to michaelweghorn/nvda that referenced this issue Jul 4, 2023
 ### Link to issue number:

Fixes nvaccess#15098

 ### Summary of the issue:

When announcement of cell coordinates is disabled in NVDA settings,
moving focus in a Calc spreadsheet resulted in the coordinates of
the previously focused cell to be announced.
This is caused by Libreoffice sending an EVENT_OBJECT_SELECTIONREMOVE
event on the previously focused cell before sending an EVENT_OBJECT_FOCUS
event for the newly focused cell
(s.  https://git.libreoffice.org/core/+/refs/heads/master/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx#588 ).
This triggered announcement of the previously focused cell in the
LibreOffice app module handling for cell selection changes.

 ### Description of user facing changes

No more announcement of the previosly focused cell when switching focus
to another one in LibreOffice Calc and announcement of cell coordinates
is disabled in NVDA settings.

 ### Description of development approach

In the LibreOffice app module specific code that handles
EVENT_OBJECT_SELECTIONREMOVE and EVENT_OBJECT_SELECTIONADD for table cells,
only trigger announcement of the selection (or currently focused cell)
if a selection actually exists, i.e. the number of selected cells is positive.
(Announcement of a focused cell when no selection exists still happens
in response to the corresponding event indicating focus change.)

 ### Testing strategy:

1) Disable announcement of cell coordinates in NVDA's settings: under "Document Formatting" -> group "Table information", uncheck the "Cell coordinates" checkbox
2) start LibreOffice Calc with a fresh document
3) press the arrow right key a few times and check that NVDA does not announce coordinates
4) move arond a bit further using the arrow keys and check that NVDA does not announce coordinates
5) select a few cells by pressing Shift + arrow keys and check that coordinates are still announced for the selection
6) enable announcement of cell coordinates again in NVDA settings and repeat steps 2-5, now checking that cell coordinates are always announced

 ### Known issues with pull request:

none

 ### Change log entries:

Bug fixes
`When moving to a different cell in LibreOffice Calc, NVDA no longer incorrectly announces the coordinates of the previously focused cell when cell coordinate announcement is diabled in NVDA's settings. (nvaccess#15098)
michaelweghorn added a commit to michaelweghorn/nvda that referenced this issue Jul 4, 2023
 ### Link to issue number:

Fixes nvaccess#15098

 ### Summary of the issue:

When announcement of cell coordinates is disabled in NVDA settings,
moving focus in a Calc spreadsheet resulted in the coordinates of
the previously focused cell to be announced.
This is caused by Libreoffice sending an EVENT_OBJECT_SELECTIONREMOVE
event on the previously focused cell before sending an EVENT_OBJECT_FOCUS
event for the newly focused cell
(s.  https://git.libreoffice.org/core/+/refs/heads/master/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx#588 ).
This triggered announcement of the previously focused cell in the
LibreOffice app module handling for cell selection changes.

 ### Description of user facing changes

No more announcement of the previosly focused cell when switching focus
to another one in LibreOffice Calc and announcement of cell coordinates
is disabled in NVDA settings.

 ### Description of development approach

In the LibreOffice app module specific code that handles
EVENT_OBJECT_SELECTIONREMOVE and EVENT_OBJECT_SELECTIONADD for table cells,
only trigger announcement of the selection (or currently focused cell)
if a selection actually exists, i.e. the number of selected cells is positive.
(Announcement of a focused cell when no selection exists still happens
in response to the corresponding event indicating focus change.)

 ### Testing strategy:

1) Disable announcement of cell coordinates in NVDA's settings: under "Document Formatting" -> group "Table information", uncheck the "Cell coordinates" checkbox
2) start LibreOffice Calc with a fresh document
3) press the arrow right key a few times and check that NVDA does not announce coordinates
4) move arond a bit further using the arrow keys and check that NVDA does not announce coordinates
5) select a few cells by pressing Shift + arrow keys and check that coordinates are still announced for the selection
6) enable announcement of cell coordinates again in NVDA settings and repeat steps 2-5, now checking that cell coordinates are always announced

 ### Known issues with pull request:

none

 ### Change log entries:

Bug fixes
`When moving to a different cell in LibreOffice Calc, NVDA no longer incorrectly announces the coordinates of the previously focused cell when cell coordinate announcement is diabled in NVDA's settings. (nvaccess#15098)
seanbudd pushed a commit that referenced this issue Jul 6, 2023
)

Fixes #15098

Summary of the issue:
When announcement of cell coordinates is disabled in NVDA settings, moving focus in a Calc spreadsheet resulted in the coordinates of the previously focused cell to be announced.
This is caused by Libreoffice sending an EVENT_OBJECT_SELECTIONREMOVE event on the previously focused cell before sending an EVENT_OBJECT_FOCUS event for the newly focused cell
(s. https://git.libreoffice.org/core/+/refs/heads/master/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx#588 ). This triggered announcement of the previously focused cell in the LibreOffice app module handling for cell selection changes.

Description of user facing changes
No more announcement of the previosly focused cell when switching focus to another one in LibreOffice Calc and announcement of cell coordinates is disabled in NVDA settings.

Description of development approach
In the LibreOffice app module specific code that handles EVENT_OBJECT_SELECTIONREMOVE and EVENT_OBJECT_SELECTIONADD for table cells, only trigger announcement of the selection (or currently focused cell) if a selection actually exists, i.e. the number of selected cells is positive. (Announcement of a focused cell when no selection exists still happens in response to the corresponding event indicating focus change.)
@nvaccessAuto nvaccessAuto added this to the 2023.2 milestone Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants