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

The ctrl-backspace command doesn't read the deleted word in LibreOffice Writer #15436

Closed
bingen13 opened this issue Sep 13, 2023 · 3 comments · Fixed by #15558
Closed

The ctrl-backspace command doesn't read the deleted word in LibreOffice Writer #15436

bingen13 opened this issue Sep 13, 2023 · 3 comments · Fixed by #15558
Labels
app/libreoffice p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@bingen13
Copy link

Steps to reproduce:

Open LibreOffice Writer. I have tested with version 7.6.0.6 64 bits, but I don't think it especially matters:

Write a few words, for example: NVDA is a free screen reader.

Then press control-backspace a couple of times.

Actual behavior:

Untitled 1 — LibreOffice Writer
Untitled 1 - LibreOffice Document  document  editable
blank
speak command keys on
NVDA
is
a
free
screen
reader
ctrl+backspace
dot
ctrl+backspace
reader
ctrl+backspace
space
ctrl+backspace
space
ctrl+backspace
space
ctrl+backspace
space
ctrl+backspace
space
ctrl+backspace

The dot and the word reader were correctly announced, but not the others.

Expected behavior:

ctrl+backspace
dot
ctrl+backspace
reader
ctrl+backspace
screen
ctrl+backspace
free
ctrl+backspace
a
ctrl+backspace
is
ctrl+backspace
sNVDA
ctrl+backspace

Each press of ctrl-backspace should announce the word that is being deleted.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

Installed.

NVDA version:

2023.2

Windows version:

Windows 10 22H2 (AMD64) build 19045.3324

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

Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (es_ES); UI: en-GB
Calc: CL threaded

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.

I have not.

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

Yes.

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

Yes.

@Qchristensen
Copy link
Member

I can also replicate this using:

NVDA 2023.2 and also NVDA 2021.3.5
In Libre Office 7.5.1.2 (X86_64)
on Windows 11 (64-bit) Version: 22H2, Build: 22621.2134

@XLTechie
Copy link
Contributor

XLTechie commented Sep 13, 2023 via email

@seanbudd seanbudd added p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority app/libreoffice triaged Has been triaged, issue is waiting for implementation. labels Sep 18, 2023
michaelweghorn added a commit to michaelweghorn/nvda that referenced this issue Oct 2, 2023
 ### Link to issue number:

Fixes nvaccess#15436

 ### Summary of the issue:

The base class implementation
`EditableText#_backspaceScriptHelper` for handling
the Ctrl+Backspace keyboard shortcut retrieves the text to
announce as deleted by expanding the text info to the
corresponding text unit and then retrieving the text.
This gives an incorrect result in at least Libreoffice Writer,
where that would return a string just containing the space character
when removing a word followed by a space using the
Ctrl+backspace keyboard shortcut.
(Writer's `IAccessibleText::textAtOffset` implementation
that gets used in `IA2TextTextInfo#_getWordOffsets`
handles the space as a separate word, but Ctrl+backspace
removes both, the actual word and following whitespace.)

 ### Description of user facing changes

When removing a word followed by whitespace in Libreoffice Writer,
the actually removed text is announced.

 ### Description of development approach

Instead of separately retrieving the text for a word,
override the default implementation in the LibreOffice app
module and announce the actually removed text when handling
Ctrl+backspace.
Use the caret position before and after the text has
been removed to identify what the removed text is.

 ### Testing strategy:

Test the scenario as described in issue nvaccess#15436:

1) start LibreOffice Writer
2) type "NVDA is a free screen reader."
3) press Ctrl+backspace 7 times
4) verify that the actually removed text is annonced by NVDA.

 ### Known issues with pull request:

None

 ### Code Review Checklist:

- [x] Documentation:
  - Change log entry
  - User Documentation
  - Developer / Technical Documentation
  - Context sensitive help for GUI changes
- [x] Testing:
  - Unit tests
  - System (end to end) tests
  - Manual testing
- [x] UX of all users considered:
  - Speech
  - Braille
  - Low Vision
  - Different web browsers
  - Localization in other languages / culture than English
- [x] API is compatible with existing add-ons.
- [x] Security precautions taken.
@michaelweghorn
Copy link
Contributor

Potential fix: #15558

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

Fixes nvaccess#15436

 ### Summary of the issue:

The base class implementation
`EditableText#_backspaceScriptHelper` for handling
the Ctrl+Backspace keyboard shortcut retrieves the text to
announce as deleted by expanding the text info to the
corresponding text unit and then retrieving the text.
This gives an incorrect result in at least Libreoffice Writer,
where that would return a string just containing the space character
when removing a word followed by a space using the
Ctrl+backspace keyboard shortcut.
(Writer's `IAccessibleText::textAtOffset` implementation
that gets used in `IA2TextTextInfo#_getWordOffsets`
handles the space as a separate word, but Ctrl+backspace
removes both, the actual word and following whitespace.)

 ### Description of user facing changes

When removing a word followed by whitespace in Libreoffice Writer,
the actually removed text is announced.

 ### Description of development approach

Instead of separately retrieving the text for a word,
override the default implementation in the LibreOffice app
module and announce the actually removed text when handling
Ctrl+backspace.
Use the caret position before and after the text has
been removed to identify what the removed text is.

 ### Testing strategy:

Test the scenario as described in issue nvaccess#15436:

1) start LibreOffice Writer
2) type "NVDA is a free screen reader."
3) press Ctrl+backspace 7 times
4) verify that the actually removed text is annonced by NVDA.

 ### Known issues with pull request:

None

 ### Code Review Checklist:

- [x] Documentation:
  - Change log entry
  - User Documentation
  - Developer / Technical Documentation
  - Context sensitive help for GUI changes
- [x] Testing:
  - Unit tests
  - System (end to end) tests
  - Manual testing
- [x] UX of all users considered:
  - Speech
  - Braille
  - Low Vision
  - Different web browsers
  - Localization in other languages / culture than English
- [x] API is compatible with existing add-ons.
- [x] Security precautions taken.
michaelweghorn added a commit to michaelweghorn/nvda that referenced this issue Oct 4, 2023
 ### Link to issue number:

Fixes nvaccess#15436

 ### Summary of the issue:

The base class implementation
`EditableText#_backspaceScriptHelper` for handling
the Ctrl+Backspace keyboard shortcut retrieves the text to
announce as deleted by expanding the text info to the
corresponding text unit and then retrieving the text.
This gives an incorrect result in at least Libreoffice Writer,
where that would return a string just containing the space character
when removing a word followed by a space using the
Ctrl+backspace keyboard shortcut.
(Writer's `IAccessibleText::textAtOffset` implementation
that gets used in `IA2TextTextInfo#_getWordOffsets`
handles the space as a separate word, but Ctrl+backspace
removes both, the actual word and following whitespace.)

 ### Description of user facing changes

When removing a word followed by whitespace in Libreoffice Writer,
the actually removed text is announced.

 ### Description of development approach

Instead of separately retrieving the text for a word,
override the default implementation in the LibreOffice app
module and announce the actually removed text when handling
Ctrl+backspace.
Use the caret position before and after the text has
been removed to identify what the removed text is.

 ### Testing strategy:

Test the scenario as described in issue nvaccess#15436:

1) start LibreOffice Writer
2) type "NVDA is a free screen reader."
3) press Ctrl+backspace 7 times
4) verify that the actually removed text is annonced by NVDA.

 ### Known issues with pull request:

None

 ### Code Review Checklist:

- [x] Documentation:
  - Change log entry
  - User Documentation
  - Developer / Technical Documentation
  - Context sensitive help for GUI changes
- [x] Testing:
  - Unit tests
  - System (end to end) tests
  - Manual testing
- [x] UX of all users considered:
  - Speech
  - Braille
  - Low Vision
  - Different web browsers
  - Localization in other languages / culture than English
- [x] API is compatible with existing add-ons.
- [x] Security precautions taken.
michaelweghorn added a commit to michaelweghorn/nvda that referenced this issue Oct 5, 2023
 ### Link to issue number:

Fixes nvaccess#15436

 ### Summary of the issue:

The base class implementation
`EditableText#_backspaceScriptHelper` for handling
the Ctrl+Backspace keyboard shortcut retrieves the text to
announce as deleted by expanding the text info to the
corresponding text unit and then retrieving the text.
This gives an incorrect result in at least Libreoffice Writer,
where that would return a string just containing the space character
when removing a word followed by a space using the
Ctrl+backspace keyboard shortcut.
(Writer's `IAccessibleText::textAtOffset` implementation
that gets used in `IA2TextTextInfo#_getWordOffsets`
handles the space as a separate word, but Ctrl+backspace
removes both, the actual word and following whitespace.)

 ### Description of user facing changes

When removing a word followed by whitespace in Libreoffice Writer,
the actually removed text is announced.

 ### Description of development approach

Instead of separately retrieving the text for a word,
override the default implementation in the LibreOffice app
module and announce the actually removed text when handling
Ctrl+backspace.
Use the caret position before and after the text has
been removed to identify what the removed text is.

 ### Testing strategy:

Test the scenario as described in issue nvaccess#15436:

1) start LibreOffice Writer
2) type "NVDA is a free screen reader."
3) press Ctrl+backspace 7 times
4) verify that the actually removed text is annonced by NVDA.

 ### Known issues with pull request:

None

 ### Code Review Checklist:

- [x] Documentation:
  - Change log entry
  - User Documentation
  - Developer / Technical Documentation
  - Context sensitive help for GUI changes
- [x] Testing:
  - Unit tests
  - System (end to end) tests
  - Manual testing
- [x] UX of all users considered:
  - Speech
  - Braille
  - Low Vision
  - Different web browsers
  - Localization in other languages / culture than English
- [x] API is compatible with existing add-ons.
- [x] Security precautions taken.
michaelweghorn added a commit to michaelweghorn/nvda that referenced this issue Oct 5, 2023
 ### Link to issue number:

Fixes nvaccess#15436

 ### Summary of the issue:

The base class implementation
`EditableText#_backspaceScriptHelper` for handling
the Ctrl+Backspace keyboard shortcut retrieves the text to
announce as deleted by expanding the text info to the
corresponding text unit and then retrieving the text.
This gives an incorrect result in at least Libreoffice Writer,
where that would return a string just containing the space character
when removing a word followed by a space using the
Ctrl+backspace keyboard shortcut.
(Writer's `IAccessibleText::textAtOffset` implementation
that gets used in `IA2TextTextInfo#_getWordOffsets`
handles the space as a separate word, but Ctrl+backspace
removes both, the actual word and following whitespace.)

 ### Description of user facing changes

When removing a word followed by whitespace in Libreoffice Writer,
the actually removed text is announced.

 ### Description of development approach

Instead of separately retrieving the text for a word,
override the default implementation in the LibreOffice app
module and announce the actually removed text when handling
Ctrl+backspace.
Use the caret position before and after the text has
been removed to identify what the removed text is.

 ### Testing strategy:

Test the scenario as described in issue nvaccess#15436:

1) start LibreOffice Writer
2) type "NVDA is a free screen reader."
3) press Ctrl+backspace 7 times
4) verify that the actually removed text is annonced by NVDA.

 ### Known issues with pull request:

None

 ### Code Review Checklist:

- [x] Documentation:
  - Change log entry
  - User Documentation
  - Developer / Technical Documentation
  - Context sensitive help for GUI changes
- [x] Testing:
  - Unit tests
  - System (end to end) tests
  - Manual testing
- [x] UX of all users considered:
  - Speech
  - Braille
  - Low Vision
  - Different web browsers
  - Localization in other languages / culture than English
- [x] API is compatible with existing add-ons.
- [x] Security precautions taken.
seanbudd pushed a commit that referenced this issue Oct 5, 2023
Fixes #15436

Summary of the issue:
The base class implementation
EditableText#_backspaceScriptHelper for handling the Ctrl+Backspace keyboard shortcut retrieves the text to announce as deleted by expanding the text info to the corresponding text unit and then retrieving the text. This gives an incorrect result in at least Libreoffice Writer, where that would return a string just containing the space character when removing a word followed by a space using the Ctrl+backspace keyboard shortcut.
(Writer's IAccessibleText::textAtOffset implementation that gets used in IA2TextTextInfo#_getWordOffsets handles the space as a separate word, but Ctrl+backspace removes both, the actual word and following whitespace.)

Description of user facing changes
When removing a word followed by whitespace in Libreoffice Writer, the actually removed text is announced.

Description of development approach
Instead of separately retrieving the text for a word, override the default implementation in the LibreOffice app module and announce the actually removed text when handling Ctrl+backspace.
Use the caret position before and after the text has been removed to identify what the removed text is.
@nvaccessAuto nvaccessAuto added this to the 2024.1 milestone Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/libreoffice p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants