Update a11y::GetAttribute to return value text 23/316323/1
authorYoungsun Suh <youngsun.suh@samsung.com>
Mon, 19 Aug 2024 08:12:46 +0000 (17:12 +0900)
committerYoungsun Suh <youngsun.suh@samsung.com>
Mon, 19 Aug 2024 08:16:43 +0000 (17:16 +0900)
Change-Id: I811df8091be1b9865c6d479ee6b08c000218a3b2

dali/internal/accessibility/bridge/bridge-accessible.cpp

index 344d968..a2e0616 100644 (file)
@@ -1023,13 +1023,20 @@ DBus::ValueOrError<std::array<uint32_t, 2>> BridgeAccessible::GetStates()
 
 DBus::ValueOrError<std::unordered_map<std::string, std::string>> BridgeAccessible::GetAttributes()
 {
-  std::unordered_map<std::string, std::string> attributes = FindSelf()->GetAttributes();
+  auto                                         self       = FindSelf();
+  std::unordered_map<std::string, std::string> attributes = self->GetAttributes();
 
   if(mIsScreenReaderSuppressed)
   {
     attributes.insert({"suppress-screen-reader", "true"});
   }
 
+  auto* valueInterface = Value::DownCast(self);
+  if(!valueInterface && !self->GetValue().empty())
+  {
+    attributes.insert({VALUE_FORMAT_KEY, VALUE_FORMAT_TEXT_VAL});
+  }
+
   return attributes;
 }