From: Artur Świgoń Date: Mon, 3 Apr 2023 09:43:26 +0000 (+0200) Subject: [NUI][AT-SPI] Override ContentPage.AccessibilityGetName() (#5141) X-Git-Tag: submit/tizen/20230405.121926~1^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be25838474a035adbf54c55a75d2ff7b3344291e;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI][AT-SPI] Override ContentPage.AccessibilityGetName() (#5141) ContentPage often serves as a default label in scenarios where Navigator is used, so Screen Reader will ask ContentPage about the accessibility name (text to read) when a Navigator page is pushed. Therefore, it makes sense to try to provide the text from ContentPage.AppBar.Title (if it exists). The application developer can always customize this by setting the AccessibilityName property or adding an AccessibilityRelation.LabelledBy. Co-authored-by: Artur Świgoń --- diff --git a/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs b/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs index 227770ab8..166951802 100755 --- a/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs +++ b/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs @@ -104,6 +104,13 @@ namespace Tizen.NUI.Components AccessibilityRole = Role.PageTab; } + /// + [EditorBrowsable(EditorBrowsableState.Never)] + protected override string AccessibilityGetName() + { + return AppBar?.Title; + } + /// /// AppBar of ContentPage. /// AppBar is added as a child of ContentPage automatically.