Skip to content

Fix braille word wrap #18219

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Fix braille word wrap #18219

wants to merge 8 commits into from

Conversation

nvdaes
Copy link
Collaborator

@nvdaes nvdaes commented Jun 5, 2025

  • If braille word wrap is enabled, check if the first character of the next braille window is a space
  • Update changelog

Link to issue number:

Fixes #18016

Summary of the issue:

When braille Word wrap is enabled, NVDA doesn't check if the first character of the next braille window is a space, causing that in some cases NVDA Splits text between braille Windows instead of using all braille cells.

Description of user facing changes:

When possible, all braille cells Will be used even if word wrap option is enabled.

Description of developer facing changes:

None.

Description of development approach:

In source/braille.py, the _calculateWindowRowBufferOffsets() function has been modified to check if the next character is a space when Word wrap is True, so that all cells can be used in such cases.

Testing strategy:

In Notepad, type:

end end end end end end end end end send

Use a Focus 40 braille display to check that all cells are used, when Word wrap is enabled and disabled.

Known issues with pull request:

None.

Code Review Checklist:

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

@coderabbitai summary

@nvdaes nvdaes marked this pull request as ready for review June 5, 2025 20:19
@nvdaes nvdaes requested a review from a team as a code owner June 5, 2025 20:19
@nvdaes nvdaes requested a review from seanbudd June 5, 2025 20:19
@seanbudd
Copy link
Member

seanbudd commented Jun 5, 2025

Thanks @nvdaes - do you think you could add some unit tests for _calculateWindowRowBufferOffsets?

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 this pull request may close these issues.

braille display line wrap algorithm assumes one cell less than is present on display
2 participants