Skip to content

Notepad with tabs: speak when switching between tabs#14588

Merged
seanbudd merged 13 commits into
nvaccess:masterfrom
mzanm:NotepadReadTabs
Mar 30, 2023
Merged

Notepad with tabs: speak when switching between tabs#14588
seanbudd merged 13 commits into
nvaccess:masterfrom
mzanm:NotepadReadTabs

Conversation

@mzanm

@mzanm mzanm commented Jan 26, 2023

Copy link
Copy Markdown
Contributor

Link to issue number:

Closes #14587

Summary of the issue:

In recent notepad releases on windows 11 insider, notepad has gained the ability to open multiple files in the same window with tabs. When switching between tabs with control tab, NVDA does not the speak the currently selected tab or it has changed at all.

Description of user facing changes

When CTRL tab is pressed, the new tab name will be spoken, similar to web browsers.

Description of development approach

Implement behavior for UIA_elementSelected, if the object is a tab and is selected, speak it.

Testing strategy:

Created multiple tabs in notepad and switched between them.

Known issues with pull request:

None.

Change log entries:

Bug fixes

  • In windows 11 with newer notepad, switching between tabs will announce tab name and position.

Code Review Checklist:

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

@mzanm mzanm requested a review from a team as a code owner January 26, 2023 14:43
@mzanm mzanm requested a review from michaelDCurran January 26, 2023 14:43
@josephsl

josephsl commented Jan 26, 2023

Copy link
Copy Markdown
Contributor

Hi,

I see. I understand that this works for speech users. Have you considered the braille experience? To bring the braille experience, call braille.handler.message and tell the braille output subsystem to print object name and position.

Thanks.

@mzanm

mzanm commented Jan 26, 2023

Copy link
Copy Markdown
Contributor Author

Fixed. Thanks.

@josephsl

Copy link
Copy Markdown
Contributor

Hi,

Turns out there is a more generalist solution that will work across apps, which will handle both Notepad and tabbed File Explorer (Windows App Essentials add-on will include a more generalist fix in March), the fix being defining a built-in UIA overlay class to handle XAML tab controls (one must be careful when defining conditions for locating tab controls). For now, I think this is ready for review by NV Access folks - I'm willing to yield #14574 so this pull request can be merged first. The only thing missing as of now is type information for the event handler caller (see appModules/lockapp.py on how it was done).

Thanks.

@mzanm

mzanm commented Jan 27, 2023

Copy link
Copy Markdown
Contributor Author

I agree a general solution would be better, but some XAML apps already announce tabs in some way, like windows terminal, so adding a general solution will cause double speaking.

@josephsl

Copy link
Copy Markdown
Contributor

Hi,

For Windows Terminal, the name of the tab is part of the focus announcement, hence double speaking when switching between them. This is not the case for tabbed Notepad and File Explorer. This was confirmed with both NVDA and Narrator.

Thanks.

@josephsl

Copy link
Copy Markdown
Contributor

@seanbudd, may I ask for a code review? I approve this PR but won't hurt for you to make the final decision. Getting this into 2023.1 would be fine, or we can wai until 2023.2 since tabbed Notepad won't make its way to folks using Windows 11 stable releases for some time (give several weeks).

Thanks.

@josephsl josephsl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this work - I think this is your first NVDA PR, and congraulations on the job well done.

Comment thread source/appModules/notepad.py
Comment thread source/appModules/notepad.py Outdated
Comment thread source/appModules/notepad.py Outdated
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 3789121c8b

Comment thread source/appModules/notepad.py Outdated
Comment thread source/appModules/notepad.py Outdated
@seanbudd

Copy link
Copy Markdown
Member

it seems there are merge conflicts. Could you resolve them?

@mzanm

mzanm commented Feb 20, 2023

Copy link
Copy Markdown
Contributor Author

Waiting for #14622 to be merged.

@josephsl

josephsl commented Feb 20, 2023 via email

Copy link
Copy Markdown
Contributor

@seanbudd

Copy link
Copy Markdown
Member

@Mazen428 - that PR has been merged now, thanks for waiting

@mzanm mzanm requested a review from seanbudd March 28, 2023 21:24

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Mazen428 - just some minor issues remaining

Comment thread source/appModules/notepad.py Outdated
Comment thread source/appModules/notepad.py
Comment thread source/appModules/notepad.py Outdated
Comment thread source/appModules/notepad.py Outdated
@seanbudd seanbudd merged commit daaddab into nvaccess:master Mar 30, 2023
@nvaccessAuto nvaccessAuto added this to the 2023.2 milestone Mar 30, 2023
seanbudd pushed a commit that referenced this pull request Apr 3, 2023
…(22H2) (#14770)

Closes #14388

Summary of the issue:
Later revisions of Windows 11 22H2 (2022 Update) introduced tabbed File Explorer. At the moment NVDA does not announce tab names when switching to different tabs.

Description of user facing changes
NVDA will announce the name of the tab being switched to in Windows 11 2022 Update File Explorer.

Description of development approach
Similar to tabbed Notepad (#14588), use UIA element selected event handler to announce tab names. Unlike Notepad, speech should not be cut off to let NVDA announce focused item when File Explorer opens.

Commits:

* appModules/explorer: announce tab switches in Windows 11 2022 Update (22H2). Re #14388.

Later revisions of Windows 11 2022 Update (22H2) introduces tabs to File Explorer, allowing users to press Control+Tab and Control+Shift+Tab to switch betwen tabs. Just like Notepad for Windows 11, UIA element selected event is fired when tab switching happens. Unlike Notepad implementation, speech will not be canceled (cut off) because doing so prevents announcement of list view items.
@mzanm mzanm deleted the NotepadReadTabs branch August 1, 2023 07:53
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.

in tabbed notepad when switching between tabs nvda should announce some way to differentiate between tabs

6 participants