From cbf80ad45b22433baa8376fd52a554b7dad1758b Mon Sep 17 00:00:00 2001 From: Syed Khaja Moinuddin Date: Thu, 25 Apr 2013 16:21:18 +0900 Subject: [PATCH] Fixes in ColorPicker & SpliPanel related to Accessibility. Signed-off-by: Syed Khaja Moinuddin Change-Id: I614c33fc293a3b3be684d711644898a9108091aa Signed-off-by: Syed Khaja Moinuddin --- src/ui/controls/FUiCtrl_ColorPicker.cpp | 3 +++ src/ui/controls/FUiCtrl_SplitPanel.cpp | 15 ++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/ui/controls/FUiCtrl_ColorPicker.cpp b/src/ui/controls/FUiCtrl_ColorPicker.cpp index 1a2f20d..6224c15 100644 --- a/src/ui/controls/FUiCtrl_ColorPicker.cpp +++ b/src/ui/controls/FUiCtrl_ColorPicker.cpp @@ -369,6 +369,7 @@ _ColorPicker::InitializeAccessibilityElement(void) String hintText(L"Double tap and drag to adjust"); + __pHueBarElement->SetName("ColorPickerColorSlider"); __pHueBarElement->SetLabel("Hue Slider"); __pHueBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pHueBarElement->SetHint(hintText); @@ -383,6 +384,7 @@ _ColorPicker::InitializeAccessibilityElement(void) __pSaturationBarElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnVoidResult(NID_UI_CTRL, __pSaturationBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + __pSaturationBarElement->SetName("ColorPickerSaturationSlider"); __pSaturationBarElement->SetLabel("Saturation Slider"); __pSaturationBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pSaturationBarElement->SetHint(hintText); @@ -397,6 +399,7 @@ _ColorPicker::InitializeAccessibilityElement(void) __pLuminanceBarElement = new (std::nothrow) _AccessibilityElement(true); SysTryReturnVoidResult(NID_UI_CTRL, __pLuminanceBarElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + __pLuminanceBarElement->SetName("ColorPickerBrightnessSlider"); __pLuminanceBarElement->SetLabel("Luminance Slider"); __pLuminanceBarElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); __pLuminanceBarElement->SetHint(hintText); diff --git a/src/ui/controls/FUiCtrl_SplitPanel.cpp b/src/ui/controls/FUiCtrl_SplitPanel.cpp index c3bc550..787fdef 100644 --- a/src/ui/controls/FUiCtrl_SplitPanel.cpp +++ b/src/ui/controls/FUiCtrl_SplitPanel.cpp @@ -818,22 +818,23 @@ _SplitPanel::OnAttachedToMainTree(void) { if (__pDividerVisualElement) { + __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + dividerRect = __pSplitPanelPresenter->GetDividerRectangle(); if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_FIXED) { - hintText = String(L"Drag scroll Fixed"); + hintText = String(L"double tap to open/close the split area"); + __pAccessibilityElement->SetTrait(L"Split view button"); } else { - hintText = String(L"Drag scroll, double tap and move to adjust split area"); + hintText = String(L"double tap and move to adjust split area"); + __pAccessibilityElement->SetTrait(L"Drag scroll"); } - __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); - SysTryReturn(NID_UI_CTRL, __pAccessibilityElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); - - __pAccessibilityElement->SetBounds(_CoordinateSystemUtils::ConvertToInteger(dividerRect)); - __pAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); + __pAccessibilityElement->SetBounds(dividerRect); __pAccessibilityElement->SetHint(hintText); __pAccessibilityElement->SetLabel(L""); __pAccessibilityElement->SetName(L"SplitPanelDivider"); -- 2.7.4