[NUI] Add to set AccessibilityName and Description in some components
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 14 Apr 2022 08:35:53 +0000 (17:35 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Thu, 21 Apr 2022 10:39:37 +0000 (19:39 +0900)
- Some NUI Components have text parts and they need to be connected with
 Accessibillity features.
 (`AccessibilityName` and `AccessibiityDescription`)

Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
src/Tizen.NUI.Components/Controls/AlertDialog.cs
src/Tizen.NUI.Components/Controls/Button.Internal.cs
src/Tizen.NUI.Components/Controls/Button.cs
src/Tizen.NUI.Components/Controls/Navigation/AppBar.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultGridItem.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultLinearItem.cs

index ba9e69ad1d8e10d73f8cf237b052177fa8dd168a..c37f63bc5639632606de09f5ad1c4c5e63815b90 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -441,7 +441,7 @@ namespace Tizen.NUI.Components
         }
 
         /// <summary>
-        /// AccessibilityGetName.
+        /// Gets accessibility name.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected override string AccessibilityGetName()
@@ -456,6 +456,15 @@ namespace Tizen.NUI.Components
             }
         }
 
+        /// <summary>
+        /// Gets accessibility description.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        protected override string AccessibilityGetDescription()
+        {
+            return Message;
+        }
+
         /// <summary>
         /// Initialize AT-SPI object.
         /// </summary>
index ab4e503197d001bf4dc4981a30a77f0d3835e57f..69b1d692ca3d0ed3ebf2a90555bcce4330c913a9 100644 (file)
@@ -37,7 +37,7 @@ namespace Tizen.NUI.Components
         private bool styleApplied = false;
 
         /// <summary>
-        /// Get accessibility name.
+        /// Gets accessibility name.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected override string AccessibilityGetName()
index 34966619df4368afab7ecc8171f7535258e2aedb..86bcef285f10395ca737058dd04e1eabf20d9311 100755 (executable)
@@ -383,7 +383,6 @@ namespace Tizen.NUI.Components
             internal set
             {
                 buttonText = value;
-                AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Label, buttonText.Text);
             }
         }
 
index 548522790c35851858f426722d63e939c40eaf21..f7532bab9c08ab08f5569c267c474075f9c3d1df 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -538,6 +538,15 @@ namespace Tizen.NUI.Components
             }
         }
 
+        /// <summary>
+        /// Gets accessibility name.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        protected override string AccessibilityGetName()
+        {
+            return Title;
+        }
+
         /// <inheritdoc/>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override void OnInitialize()
index 6ac1af402767f205234d0da132ce16eee38db3c7..e69101951031ad0167dfb59a20f0c35c240687f2 100755 (executable)
@@ -205,7 +205,6 @@ namespace Tizen.NUI.Components
             {
                 itemLabel = value;
                 layoutChanged = true;
-                AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Label, itemLabel.Text);
             }
         }
 
@@ -476,6 +475,15 @@ namespace Tizen.NUI.Components
 
         }
 
+        /// <summary>
+        /// Gets accessibility name.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        protected override string AccessibilityGetName()
+        {
+            return itemLabel.Text;
+        }
+
         /// <summary>
         /// Initializes AT-SPI object.
         /// </summary>
index 1b7c77ff911b429ddab7fd4f054487aa67db061d..f09d29fbfd51e97736a75623cf90a0e570f0018d 100755 (executable)
@@ -156,7 +156,6 @@ namespace Tizen.NUI.Components
             internal set
             {
                 itemLabel = value;
-                AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Label, itemLabel.Text);
             }
         }
 
@@ -210,7 +209,6 @@ namespace Tizen.NUI.Components
             internal set
             {
                 itemSubLabel = value;
-                AccessibilityManager.Instance.SetAccessibilityAttribute(this, AccessibilityManager.AccessibilityAttribute.Label, itemSubLabel.Text);
             }
         }
 
@@ -360,7 +358,7 @@ namespace Tizen.NUI.Components
         }
 
         /// <summary>
-        /// Get accessibility name.
+        /// Gets accessibility name.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected override string AccessibilityGetName()