From 257fef191ec6ad7cc11ce76ff206d676f7ff16e9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Jun 2026 20:08:01 +0000 Subject: [PATCH 1/2] Initial plan From 16239bfae2e3dcea475e413d31bcb3e84bcea19f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Jun 2026 20:12:19 +0000 Subject: [PATCH 2/2] Fix review comments: use spaced moniker syntax and fix misleading wording --- docs/fundamentals/shell/navigation.md | 21 +++++++++++++- docs/user-interface/pages/navigationpage.md | 31 ++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/docs/fundamentals/shell/navigation.md b/docs/fundamentals/shell/navigation.md index 51b23b716e..92bea371bc 100644 --- a/docs/fundamentals/shell/navigation.md +++ b/docs/fundamentals/shell/navigation.md @@ -1,7 +1,7 @@ --- title: ".NET MAUI Shell navigation" description: "Learn how .NET MAUI Shell apps can utilize a URI-based navigation experience that permits navigation to any page in the app, without having to follow a set navigation hierarchy." -ms.date: 01/14/2025 +ms.date: 06/05/2026 --- # .NET MAUI Shell navigation @@ -589,6 +589,25 @@ Back button appearance and behavior can be redefined by setting the also defines an `AccessibilityLabel` property of type `string`, which sets the accessibility label that screen readers announce for the back button. This is independent of `TextOverride`, so the visible label can stay short while the spoken label stays descriptive. The following example sets `IconOverride` and `AccessibilityLabel` together: + +```xaml + + + + + ... + +``` + +Setting an explicit `AccessibilityLabel` is recommended whenever `IconOverride` is set or `TextOverride` is hidden, because screen readers would otherwise announce a generic value or no value at all. For more accessibility guidance, see [Accessibility](~/fundamentals/accessibility.md). + +::: moniker-end + ::: moniker range="=net-maui-8.0" All of these properties are backed by objects, which means that the properties can be targets of data bindings. Each has a `OneTime` binding mode, which means that data goes from the source to the target but only when the `BindingContext` changes. diff --git a/docs/user-interface/pages/navigationpage.md b/docs/user-interface/pages/navigationpage.md index fcf15b6f1f..daffe0762b 100644 --- a/docs/user-interface/pages/navigationpage.md +++ b/docs/user-interface/pages/navigationpage.md @@ -1,7 +1,7 @@ --- title: "NavigationPage" description: "The .NET MAUI NavigationPage is used to perform hierarchical navigation through a stack of last-in, first-out (LIFO) pages." -ms.date: 11/28/2025 +ms.date: 06/05/2026 --- # NavigationPage @@ -24,6 +24,13 @@ The .NET Multi-platform App UI (.NET MAUI) , defines the icon that represents the title on the navigation bar. This is an attached property. - `TitleView`, of type , defines the view that can be displayed in the navigation bar. This is an attached property. +::: moniker range=">=net-maui-11.0" + +> [!NOTE] +> Starting in .NET MAUI 11, also defines a `BackButtonAccessibilityLabel` attached property of type `string`, which sets the accessibility label that screen readers announce for the back button on the navigation bar. See [Set the back button accessibility label](#set-the-back-button-accessibility-label) for an example. + +::: moniker-end + These properties are backed by objects, which means that they can be targets of data bindings, and styled. The class also defines three events: @@ -208,6 +215,28 @@ In this example, the current page is removed from the modal stack, with the new On Android, you can always return to the previous page by pressing the standard *Back* button on the device. If the modal page requires a self-contained task to be completed before leaving the page, the app must disable the *Back* button. This can be accomplished by overriding the `Page.OnBackButtonPressed` method on the modal page. +::: moniker range=">=net-maui-11.0" + +### Set the back button accessibility label + +Starting in .NET MAUI 11, you can set the accessibility label that screen readers (TalkBack on Android, VoiceOver on iOS and Mac Catalyst, Narrator on Windows) announce for the back button on a navigation bar. The label is set with the `NavigationPage.BackButtonAccessibilityLabel` attached property on the page that displays the back button: + +```xaml + + + +``` + +Setting an explicit label is recommended when the back button title is hidden, abbreviated, or shows only an icon, because screen readers would otherwise announce a generic value or no value at all. The label is independent of the `BackButtonTitle` attached property, so the visible title can stay short while the spoken label stays descriptive. + +For more accessibility guidance, see [Accessibility](~/fundamentals/accessibility.md). + +::: moniker-end + ## Page navigation events The class defines `NavigatedTo`, `NavigatingFrom`, and `NavigatedFrom` navigation events that are raised during page navigation. The `NavigatingFrom` event is raised when the current page is about to be navigated away from. The `NavigatedFrom` event is raised after the current page has been navigated away from. The `NavigatedTo` event is raised after navigating to the current page.