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

[Windows/WinUI] Main window doesn't have an accessible name by default #14465

Open
spadapet opened this issue Apr 8, 2023 · 6 comments
Open
Labels
area-controls-window Window legacy-area-a11y Relates to accessibility platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/a11y Relates to accessibility t/bug Something isn't working
Milestone

Comments

@spadapet
Copy link
Contributor

spadapet commented Apr 8, 2023

Description

MAUI's main window on Windows desktop has no title by default and is therefore not accessible. When the MAUI window gets focus, the narrator will say "DesktopChildSiteBridge" which is not helpful. By default, the window title should be anything but empty, it could be the app name by default.

Is there an easy way in XAML to set the window title?

Steps to Reproduce

REPRO:

  1. In VS 2022, create a new MAUI app from template
  2. Build and run the app on the Windows desktop
  3. Turn on Windows narrator, set focus to the MAUI app

EXPECT:
Narrator announces the app name

RESULT:
Narrator announces that "DesktopChildSiteBridge" was activated

NOTE: If you F5 to build and run, you can use the in-app toolbar to run the accessibility checker from Visual Studio. There should be one error that an element doesn't have a name. It's referring to the main window not having a name.

image

Link to public reproduction project repository

N/A, use default template

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

net7.0-windows10.0.19041.0

Did you find any workaround?

In App.xaml.cs, I can override the CreateWindow method to inject my own window title. This shouldn't be required.

Relevant log output

No response

@spadapet spadapet added the t/bug Something isn't working label Apr 8, 2023
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Apr 10, 2023
@ghost
Copy link

ghost commented Apr 10, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@PureWeen
Copy link
Member

@spadapet this is already fixed in NET 8
#13521

The DesktopChildSiteBridge is a WinUI bug that'll hopefully be fixed in 1.3 #10131

I don't think there's really a bug here but I do think we need some additional APIs
An attached property for setting Window title would be useful. I think also including the Window as a class inside the templates would be useful.

@davidortinau
Copy link
Contributor

I installed 17.5.4 with .NET MAUI 7.0.81. Adding a Title to AppShell.xaml works and displays. fwiw

@spadapet
Copy link
Contributor Author

spadapet commented May 2, 2023

@PureWeen thanks, then this issue can probably be closed due to #13521. Discussion about whether a new attached property would be useful can happen elsewhere.

@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 26, 2023
@XamlTest
Copy link

Verified this on Visual Studio Enterprise 17.7.0 Preview 2.0. Repro on Windows 11 with below Project:
14465.zip(.NET 7)

@BurkusCat
Copy link
Contributor

I think this is still broken outside of Shell. I've so far not found any way to set the title on a WinUI app (package.appxmanifest, <ApplicationTitle>, WindowHandle = WinRT.Interop.WindowNative.GetWindowHandle(window); window.AppWindow.Title = "test"; window.Title = "test"; all don't work).

My expectation would be the default window title would be based on the value set for ApplicationTitle.

@Eilon Eilon added the t/a11y Relates to accessibility label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-window Window legacy-area-a11y Relates to accessibility platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/a11y Relates to accessibility t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants