Description
Currently it's tricky to modify the text you want read out for the BackButton, if you want it to differ from what you've set for the BackButtonBehavior (Shell) or the NavigationPage.SetBackButtonTitle.
We should add some additional properties to modify the semantic text for the back button.
Steps to Reproduce
Scenario 1 – Shell Navigation (GoToAsync + BackButtonBehavior)
- Launch the app — lands on MainPage Sample1.zip
- Tap "GoToAsync → DetailPage (Shell + BackButtonBehavior)"
- Navigates to DetailPage via Shell routing
- Back button visually shows "Override" (set using BackButtonBehavior.TextOverride)
- Focus the back button using VoiceOver/TalkBack
Scenario 2 – NavigationPage (PushAsync + SetBackButtonTitle)
- From MainPage, tap "PushAsync → SecondPage (NavigationPage.SetBackButtonTitle)"
- A modal NavigationPage opens, displaying NavHomePage
- Tap "PushAsync → SecondPage"
- Navigates to SecondPage — back button visually shows "BackTitle"
- Focus the back button using VoiceOver/TalkBack
Workaround
One workaround on Android would be to do this
#if ANDROID
ToolbarHandler.Mapper.AppendToMapping(nameof(IToolbar.BackButtonVisible), (handler, view) =>
{
handler.PlatformView.NavigationContentDescription = "text";
});
ToolbarHandler.Mapper.AppendToMapping(nameof(Toolbar.BackButtonTitle), (handler, view) =>
{
handler.PlatformView.NavigationContentDescription = "text";
});
#endif
})
Description
Currently it's tricky to modify the text you want read out for the BackButton, if you want it to differ from what you've set for the BackButtonBehavior (Shell) or the NavigationPage.SetBackButtonTitle.
We should add some additional properties to modify the semantic text for the back button.
Steps to Reproduce
Scenario 1 – Shell Navigation (GoToAsync + BackButtonBehavior)
Scenario 2 – NavigationPage (PushAsync + SetBackButtonTitle)
Workaround
One workaround on
Androidwould be to do this