2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/accessibility/bridge/bridge-accessible.h>
25 //comment out 2 lines below to get more logs
27 #define LOG() _LoggerEmpty()
29 using namespace Dali::Accessibility;
31 #define GET_NAVIGABLE_AT_POINT_MAX_RECURSION_DEPTH 10000
35 bool SortVertically(Component* lhs, Component* rhs)
37 auto leftRect = lhs->GetExtents(CoordType::WINDOW);
38 auto rightRect = rhs->GetExtents(CoordType::WINDOW);
40 return leftRect.y < rightRect.y;
43 bool SortHorizontally(Component* lhs, Component* rhs)
45 auto leftRect = lhs->GetExtents(CoordType::WINDOW);
46 auto rightRect = rhs->GetExtents(CoordType::WINDOW);
48 return leftRect.x < rightRect.x;
51 std::vector<std::vector<Component*>> SplitLines(const std::vector<Component*>& children)
53 // Find first with non-zero area
54 auto first = std::find_if(children.begin(), children.end(), [](Component* component) -> bool {
55 auto extents = component->GetExtents(CoordType::WINDOW);
56 return extents.height != 0.0f && extents.width != 0.0f;
59 if(first == children.end())
64 std::vector<std::vector<Component*>> lines(1);
65 Dali::Rect<> lineRect = (*first)->GetExtents(CoordType::WINDOW);
69 for(auto it = first; it != children.end(); ++it)
73 rect = child->GetExtents(CoordType::WINDOW);
74 if(rect.height == 0.0f || rect.width == 0.0f)
80 if(lineRect.y + (0.25 * lineRect.height) >= rect.y)
83 lines.back().push_back(child);
90 lines.back().push_back(child);
97 } // anonymous namespace
99 BridgeAccessible::BridgeAccessible()
103 void BridgeAccessible::RegisterInterfaces()
105 DBus::DBusInterfaceDescription desc{AtspiDbusInterfaceAccessible};
106 AddGetPropertyToInterface(desc, "ChildCount", &BridgeAccessible::GetChildCount);
107 AddGetPropertyToInterface(desc, "Name", &BridgeAccessible::GetName);
108 AddGetPropertyToInterface(desc, "Description", &BridgeAccessible::GetDescription);
109 AddGetPropertyToInterface(desc, "Parent", &BridgeAccessible::GetParent);
110 AddFunctionToInterface(desc, "GetRole", &BridgeAccessible::GetRole);
111 AddFunctionToInterface(desc, "GetRoleName", &BridgeAccessible::GetRoleName);
112 AddFunctionToInterface(desc, "GetLocalizedRoleName", &BridgeAccessible::GetLocalizedRoleName);
113 AddFunctionToInterface(desc, "GetState", &BridgeAccessible::GetStates);
114 AddFunctionToInterface(desc, "GetAttributes", &BridgeAccessible::GetAttributes);
115 AddFunctionToInterface(desc, "GetInterfaces", &BridgeAccessible::GetInterfaces);
116 AddFunctionToInterface(desc, "GetChildAtIndex", &BridgeAccessible::GetChildAtIndex);
117 AddFunctionToInterface(desc, "GetChildren", &BridgeAccessible::GetChildren);
118 AddFunctionToInterface(desc, "GetIndexInParent", &BridgeAccessible::GetIndexInParent);
119 AddFunctionToInterface(desc, "GetNavigableAtPoint", &BridgeAccessible::GetNavigableAtPoint);
120 AddFunctionToInterface(desc, "GetNeighbor", &BridgeAccessible::GetNeighbor);
121 AddFunctionToInterface(desc, "GetDefaultLabelInfo", &BridgeAccessible::GetDefaultLabelInfo);
122 AddFunctionToInterface(desc, "DoGesture", &BridgeAccessible::DoGesture);
123 AddFunctionToInterface(desc, "GetReadingMaterial", &BridgeAccessible::GetReadingMaterial);
124 AddFunctionToInterface(desc, "GetRelationSet", &BridgeAccessible::GetRelationSet);
125 dbusServer.addInterface("/", desc, true);
128 static bool AcceptObjectCheckRelations(Component* obj)
130 auto r = obj->GetRelationSet();
132 for(const auto& it : r)
133 if(it.relationType == RelationType::CONTROLLED_BY)
139 static Component* GetScrollableParent(Accessible* obj)
143 obj = obj->GetParent();
144 auto comp = dynamic_cast<Component*>(obj);
145 if(comp && comp->IsScrollable())
151 static bool ObjectIsItem(Component* obj)
155 auto role = obj->GetRole();
156 return role == Role::LIST_ITEM || role == Role::MENU_ITEM;
159 static bool ObjectIsCollapsed(Component* obj)
163 const auto states = obj->GetStates();
164 return states[State::EXPANDABLE] && !states[State::EXPANDED];
167 static bool OobjectIsZeroSize(Component* obj)
171 auto extents = obj->GetExtents(CoordType::WINDOW);
172 return extents.height == 0 || extents.width == 0;
175 static bool AcceptObject(Component* obj)
179 const auto states = obj->GetStates();
180 if(!states[State::VISIBLE])
182 if(!AcceptObjectCheckRelations(obj))
184 if(!states[State::HIGHLIGHTABLE])
187 if(GetScrollableParent(obj) != nullptr)
189 auto parent = dynamic_cast<Component*>(obj->GetParent());
193 return !ObjectIsItem(obj) || !ObjectIsCollapsed(parent);
198 if(OobjectIsZeroSize(obj))
202 if(!states[State::SHOWING])
210 static bool AcceptObject(Accessible* obj)
212 auto c = dynamic_cast<Component*>(obj);
213 return AcceptObject(c);
216 static int32_t GetItemCountOfList(Accessible* obj)
218 int32_t itemCount = 0;
219 if(obj && obj->GetRole() == Role::LIST)
221 for(auto i = 0u; i < static_cast<size_t>(obj->GetChildCount()); ++i)
223 auto child = obj->GetChildAtIndex(i);
224 if(child && child->GetRole() == Role::LIST_ITEM)
233 static int32_t GetItemCountOfFirstDescendantList(Accessible* obj)
235 int32_t itemCount = 0;
236 itemCount = GetItemCountOfList(obj);
237 if(itemCount > 0 || !obj)
242 for(auto i = 0u; i < static_cast<size_t>(obj->GetChildCount()); ++i)
244 auto child = obj->GetChildAtIndex(i);
245 itemCount = GetItemCountOfFirstDescendantList(child);
254 static std::string objDump(Component* obj)
258 std::ostringstream o;
259 auto e = obj->GetExtents(CoordType::SCREEN);
260 o << "name: " << obj->GetName() << " extent: (" << e.x << ", "
261 << e.y << "), [" << e.width << ", " << e.height << "]";
265 Component* BridgeAccessible::GetObjectInRelation(Accessible* obj, RelationType ralationType)
269 for(auto& relation : obj->GetRelationSet())
271 if(relation.relationType == ralationType)
273 for(auto& address : relation.targets)
275 auto component = dynamic_cast<Component*>(Find(address));
284 static std::string makeIndent(unsigned int maxRecursionDepth)
286 return std::string(GET_NAVIGABLE_AT_POINT_MAX_RECURSION_DEPTH - maxRecursionDepth, ' ');
289 Component* BridgeAccessible::CalculateNavigableAccessibleAtPoint(Accessible* root, Point p, CoordType cType, unsigned int maxRecursionDepth)
291 if(!root || maxRecursionDepth == 0)
293 auto root_component = dynamic_cast<Component*>(root);
294 LOG() << "CalculateNavigableAccessibleAtPoint: checking: " << makeIndent(maxRecursionDepth) << objDump(root_component);
296 if(root_component && !root_component->Contains(p, cType))
299 auto children = root->GetChildren();
300 for(auto childIt = children.rbegin(); childIt != children.rend(); childIt++)
302 //check recursively all children first
303 auto result = CalculateNavigableAccessibleAtPoint(*childIt, p, cType, maxRecursionDepth - 1);
309 //Found a candidate, all its children are already checked
310 auto controledBy = GetObjectInRelation(root_component, RelationType::CONTROLLED_BY);
312 controledBy = root_component;
314 if(controledBy->IsProxy() || AcceptObject(controledBy))
316 LOG() << "CalculateNavigableAccessibleAtPoint: found: " << makeIndent(maxRecursionDepth) << objDump(root_component);
323 BridgeAccessible::ReadingMaterialType BridgeAccessible::GetReadingMaterial()
325 auto self = FindSelf();
326 auto findObjectByRelationType = [this, &self](RelationType relationType) {
327 auto relations = self->GetRelationSet();
328 auto relation = std::find_if(relations.begin(),
330 [relationType](const Dali::Accessibility::Relation& relation) -> bool {
331 return relation.relationType == relationType;
333 return relations.end() != relation && !relation->targets.empty() ? Find(relation->targets.back()) : nullptr;
336 auto labellingObject = findObjectByRelationType(RelationType::LABELLED_BY);
337 std::string labeledByName = labellingObject ? labellingObject->GetName() : "";
339 auto describedByObject = findObjectByRelationType(RelationType::DESCRIBED_BY);
341 double currentValue = 0.0;
342 double minimumIncrement = 0.0;
343 double maximumValue = 0.0;
344 double minimumValue = 0.0;
345 auto* valueInterface = dynamic_cast<Dali::Accessibility::Value*>(self);
348 currentValue = valueInterface->GetCurrent();
349 minimumIncrement = valueInterface->GetMinimumIncrement();
350 maximumValue = valueInterface->GetMaximum();
351 minimumValue = valueInterface->GetMinimum();
354 int32_t firstSelectedChildIndex = -1;
355 int32_t selectedChildCount = 0;
356 auto* selfSelectionInterface = dynamic_cast<Dali::Accessibility::Selection*>(self);
357 if(selfSelectionInterface)
359 selectedChildCount = selfSelectionInterface->GetSelectedChildrenCount();
360 auto firstSelectedChild = selfSelectionInterface->GetSelectedChild(0);
361 if(firstSelectedChild)
363 firstSelectedChildIndex = firstSelectedChild->GetIndexInParent();
367 auto childCount = static_cast<int32_t>(self->GetChildCount());
368 bool hasCheckBoxChild = false;
369 for(auto i = 0u; i < static_cast<size_t>(childCount); ++i)
371 auto child = self->GetChildAtIndex(i);
372 if(child->GetRole() == Role::CHECK_BOX)
374 hasCheckBoxChild = true;
379 auto role = static_cast<uint32_t>(self->GetRole());
380 int32_t listChildrenCount = 0;
381 if(role == static_cast<uint32_t>(Role::DIALOG))
383 listChildrenCount = GetItemCountOfFirstDescendantList(self);
386 auto* textInterface = dynamic_cast<Dali::Accessibility::Text*>(self);
387 std::string nameFromTextInterface = "";
390 nameFromTextInterface = textInterface->GetText(0, textInterface->GetCharacterCount());
393 auto description = self->GetDescription();
394 auto attributes = self->GetAttributes();
395 auto states = self->GetStates();
396 auto name = self->GetName();
397 auto localizedRoleName = self->GetLocalizedRoleName();
398 auto indexInParent = static_cast<int32_t>(self->GetIndexInParent());
400 auto parent = self->GetParent();
401 auto parentRole = static_cast<uint32_t>(parent ? parent->GetRole() : Role{});
402 auto parentChildCount = parent ? static_cast<int32_t>(parent->GetChildCount()) : 0;
403 auto parentStateSet = parent ? parent->GetStates() : States{};
404 bool isSelectedInParent = false;
405 auto* parentSelectionInterface = dynamic_cast<Dali::Accessibility::Selection*>(parent);
406 if(parentSelectionInterface)
408 isSelectedInParent = parentSelectionInterface->IsChildSelected(indexInParent);
415 nameFromTextInterface,
429 firstSelectedChildIndex,
438 void BridgeAccessible::SuppressScreenReader(bool suppress)
440 suppressScreenReader = suppress;
443 DBus::ValueOrError<bool> BridgeAccessible::DoGesture(Dali::Accessibility::Gesture type, int32_t xBeg, int32_t yBeg, int32_t xEnd, int32_t yEnd, Dali::Accessibility::GestureState state, uint32_t eventTime)
445 return FindSelf()->DoGesture(Dali::Accessibility::GestureInfo{type, xBeg, xEnd, yBeg, yEnd, state, eventTime});
448 DBus::ValueOrError<Accessible*, uint8_t, Accessible*> BridgeAccessible::GetNavigableAtPoint(int32_t x, int32_t y, uint32_t coordType)
450 Accessible* deputy = nullptr;
451 auto accessible = FindSelf();
452 auto cType = static_cast<CoordType>(coordType);
453 LOG() << "GetNavigableAtPoint: " << x << ", " << y << " type: " << coordType;
454 auto component = CalculateNavigableAccessibleAtPoint(accessible, {x, y}, cType, GET_NAVIGABLE_AT_POINT_MAX_RECURSION_DEPTH);
455 bool recurse = false;
458 recurse = component->IsProxy();
461 return {component, recurse, deputy};
464 static bool CheckChainEndWithAttribute(Accessible* obj, unsigned char forward)
468 auto attrs = obj->GetAttributes();
469 for(auto& attr : attrs)
471 if(attr.first == "relation_chain_end")
473 if((attr.second == "prev,end" && forward == 0) || (attr.second == "next,end" && forward == 1) || attr.second == "prev,next,end")
482 static Accessible* DeputyOfProxyInParentGet(Accessible* obj)
487 Accessible* BridgeAccessible::GetCurrentlyHighlighted()
489 //TODO: add currently highlighted object
493 std::vector<Accessible*> BridgeAccessible::ValidChildrenGet(const std::vector<Accessible*>& children, Accessible* start, Accessible* root)
495 std::vector<Component*> vec;
496 std::vector<Accessible*> ret;
498 for(auto child : children)
500 if(auto* component = dynamic_cast<Component*>(child); component)
502 vec.push_back(component);
506 std::sort(vec.begin(), vec.end(), &SortVertically);
508 for(auto& line : SplitLines(vec))
510 std::sort(line.begin(), line.end(), &SortHorizontally);
511 ret.insert(ret.end(), line.begin(), line.end());
517 static bool DeputyIs(Accessible* obj)
523 static Accessible* ProxyInParentGet(Accessible* obj)
527 auto children = obj->GetChildren();
528 for(auto& child : children)
536 static bool ObjectRoleIsAcceptableWhenNavigatingNextPrev(Accessible* obj)
540 auto role = obj->GetRole();
541 return role != Role::POPUP_MENU && role != Role::DIALOG;
545 struct CycleDetection
547 CycleDetection(const T value)
549 currentSearchSize(1),
553 bool check(const T value)
559 currentSearchSize <<= 1;
560 if(currentSearchSize == 0)
561 return true; // UNDEFINED BEHAVIOR
562 counter = currentSearchSize;
568 unsigned int currentSearchSize;
569 unsigned int counter;
572 static Accessible* FindNonDefunctChild(const std::vector<Accessible*>& children, unsigned int currentIndex, unsigned char forward)
574 unsigned int childrenCount = children.size();
575 for(; currentIndex < childrenCount; forward ? ++currentIndex : --currentIndex)
577 Accessible* n = children[currentIndex];
578 if(n && !n->GetStates()[State::DEFUNCT])
584 static Accessible* DirectionalDepthFirstSearchTryNonDefunctChild(Accessible* node, const std::vector<Accessible*>& children, unsigned char forward)
588 auto childrenCount = children.size();
589 if(childrenCount > 0)
591 const bool isShowing = GetScrollableParent(node) == nullptr ? node->GetStates()[State::SHOWING] : true;
594 return FindNonDefunctChild(children, forward ? 0 : childrenCount - 1, forward);
600 Accessible* BridgeAccessible::GetNextNonDefunctSibling(Accessible* obj, Accessible* start, Accessible* root, unsigned char forward)
604 auto parent = obj->GetParent();
608 auto children = ValidChildrenGet(parent->GetChildren(), start, root);
610 unsigned int children_count = children.size();
611 if(children_count == 0)
615 unsigned int current = 0;
616 for(; current < children_count && children[current] != obj; ++current)
618 if(current >= children_count)
622 forward ? ++current : --current;
623 auto ret = FindNonDefunctChild(children, current, forward);
627 Accessible* BridgeAccessible::DirectionalDepthFirstSearchTryNonDefunctSibling(bool& all_children_visited, Accessible* node, Accessible* start, Accessible* root, unsigned char forward)
631 Accessible* sibling = GetNextNonDefunctSibling(node, start, root, forward);
635 all_children_visited = false;
639 node = node->GetParent();
640 if(node == nullptr || node == root)
643 // in backward traversing stop the walk up on parent
650 Accessible* BridgeAccessible::CalculateNeighbor(Accessible* root, Accessible* start, unsigned char forward, BridgeAccessible::GetNeighborSearchMode search_mode)
652 if(start && CheckChainEndWithAttribute(start, forward))
654 if(root && root->GetStates()[State::DEFUNCT])
656 if(start && start->GetStates()[State::DEFUNCT])
662 if(search_mode == BridgeAccessible::GetNeighborSearchMode::recurseToOutside)
664 // This only works if we navigate backward, and it is not possible to
665 // find in embedded process. In this case the deputy should be used */
666 return DeputyOfProxyInParentGet(start);
669 Accessible* node = start ? start : root;
673 // initialization of all-children-visited flag for start node - we assume
674 // that when we begin at start node and we navigate backward, then all children
675 // are visited, so navigation will ignore start's children and go to
676 // previous sibling available.
677 // Regarding condtion (start != root):
678 // The last object can be found only if all_children_visited is false.
679 // The start is same with root, when looking for the last object.
680 bool all_children_visited = (start != root) && (search_mode != BridgeAccessible::GetNeighborSearchMode::recurseFromRoot && !forward);
681 // true, if starting element should be ignored. this is only used in rare case of
682 // recursive search failing to find an object.
683 // consider tree, where element A on bus BUS_A has child B on bus BUS_B. when going "next" from
684 // element A algorithm has to descend into BUS_B and search element B and its children. this is done
685 // by returning to our caller object B with special flag set (meaning - continue the search from B on bus BUS_B).
686 // if next object will be found there (on BUS_B), then search ends. but if not, then our caller will find it out
687 // and will call us again with object A and flag search_mode set to NEIGHBOR_SEARCH_MODE_CONTINUE_AFTER_FAILED_RECURSING.
688 // this flag means, that object A was already checked previously and we should skip it and its children.
689 bool force_next = (search_mode == BridgeAccessible::GetNeighborSearchMode::continueAfterFailedRecursion);
691 CycleDetection<Accessible*> cycleDetection(node);
694 if(node->GetStates()[State::DEFUNCT])
697 // always accept proxy object from different world
698 if(!force_next && node->IsProxy())
701 auto children = node->GetChildren();
702 children = ValidChildrenGet(children, start, root);
706 // 2. parent after all children in backward traversing
707 // 3. Nodes with roles: ATSPI_ROLE_PAGE_TAB, ATSPI_ROLE_POPUP_MENU and ATSPI_ROLE_DIALOG, only when looking for first or last element.
708 // Objects with those roles shouldnt be reachable, when navigating next / prev.
709 bool all_children_visited_or_moving_forward = (children.size() == 0 || forward || all_children_visited);
710 if(!force_next && node != start && all_children_visited_or_moving_forward && AcceptObject(node))
712 if(start == NULL || ObjectRoleIsAcceptableWhenNavigatingNextPrev(node))
716 Accessible* next_related_in_direction = !force_next ? GetObjectInRelation(node, forward ? RelationType::FLOWS_TO : RelationType::FLOWS_FROM) : nullptr;
717 // force_next means that the search_mode is NEIGHBOR_SEARCH_MODE_CONTINUE_AFTER_FAILED_RECURSING
718 // in this case the node is elm_layout which is parent of proxy object.
719 // There is an access object working for the proxy object, and the access
720 // object could have relation information. This relation information should
721 // be checked first before using the elm_layout as a node.
722 if(force_next && forward)
724 auto deputy = DeputyOfProxyInParentGet(node);
725 next_related_in_direction =
726 GetObjectInRelation(deputy, RelationType::FLOWS_TO);
729 if(next_related_in_direction && start && start->GetStates()[State::DEFUNCT])
731 next_related_in_direction = NULL;
734 unsigned char want_cycle_detection = 0;
735 if(next_related_in_direction)
737 // Check next_related_in_direction is deputy object
741 // If the prev object is deputy, then go to inside of its proxy first
742 if(DeputyIs(next_related_in_direction))
744 parent = next_related_in_direction->GetParent();
745 next_related_in_direction = ProxyInParentGet(parent);
750 // If current object is deputy, and it has relation next object,
751 // then do not use the relation next object, and use proxy first
754 parent = node->GetParent();
755 next_related_in_direction = ProxyInParentGet(parent);
758 node = next_related_in_direction;
759 want_cycle_detection = 1;
763 auto child = !force_next && !all_children_visited ? DirectionalDepthFirstSearchTryNonDefunctChild(node, children, forward) : nullptr;
766 want_cycle_detection = 1;
770 if(!force_next && node == root)
772 all_children_visited = true;
773 child = DirectionalDepthFirstSearchTryNonDefunctSibling(all_children_visited, node, start, root, forward);
778 if(want_cycle_detection && cycleDetection.check(node))
786 DBus::ValueOrError<Accessible*, uint8_t> BridgeAccessible::GetNeighbor(std::string rootPath, int32_t direction, int32_t search_mode)
788 auto start = FindSelf();
789 rootPath = StripPrefix(rootPath);
790 auto root = !rootPath.empty() ? Find(rootPath) : nullptr;
791 auto accessible = CalculateNeighbor(root, start, direction == 1, static_cast<GetNeighborSearchMode>(search_mode));
792 unsigned char recurse = 0;
795 recurse = accessible->IsProxy();
797 return {accessible, recurse};
800 Accessible* BridgeAccessible::GetParent()
802 // NOTE: currently bridge supports single application root element.
803 // only element set as application root might return nullptr from GetParent
804 // if you want more, then you need to change setApplicationRoot to
805 // add/remove ApplicationRoot and make roots a vector.
806 auto p = FindSelf()->GetParent();
810 DBus::ValueOrError<std::vector<Accessible*>> BridgeAccessible::GetChildren()
812 return FindSelf()->GetChildren();
814 std::string BridgeAccessible::GetDescription()
816 return FindSelf()->GetDescription();
818 DBus::ValueOrError<uint32_t> BridgeAccessible::GetRole()
820 return static_cast<unsigned int>(FindSelf()->GetRole());
822 DBus::ValueOrError<std::string> BridgeAccessible::GetRoleName()
824 return FindSelf()->GetRoleName();
826 DBus::ValueOrError<std::string> BridgeAccessible::GetLocalizedRoleName()
828 return FindSelf()->GetLocalizedRoleName();
830 DBus::ValueOrError<int32_t> BridgeAccessible::GetIndexInParent()
832 return FindSelf()->GetIndexInParent();
834 DBus::ValueOrError<std::array<uint32_t, 2>> BridgeAccessible::GetStates()
836 return FindSelf()->GetStates().GetRawData();
838 DBus::ValueOrError<std::unordered_map<std::string, std::string>> BridgeAccessible::GetAttributes()
840 std::unordered_map<std::string, std::string> attributes = FindSelf()->GetAttributes();
841 if(suppressScreenReader)
843 attributes.insert({"suppress-screen-reader", "true"});
848 DBus::ValueOrError<std::vector<std::string>> BridgeAccessible::GetInterfaces()
850 return FindSelf()->GetInterfaces();
852 int BridgeAccessible::GetChildCount()
854 return FindSelf()->GetChildCount();
856 DBus::ValueOrError<Accessible*> BridgeAccessible::GetChildAtIndex(int index)
859 throw std::domain_error{"negative index (" + std::to_string(index) + ")"};
860 return FindSelf()->GetChildAtIndex(static_cast<size_t>(index));
863 std::string BridgeAccessible::GetName()
865 return FindSelf()->GetName();
868 DBus::ValueOrError<Accessible*, uint32_t, std::unordered_map<std::string, std::string>> BridgeAccessible::GetDefaultLabelInfo()
870 auto defaultLabel = FindSelf()->GetDefaultLabel();
871 return {defaultLabel, static_cast<uint32_t>(defaultLabel->GetRole()), defaultLabel->GetAttributes()};
874 DBus::ValueOrError<std::vector<BridgeAccessible::Relation>> BridgeAccessible::GetRelationSet()
876 auto relations = FindSelf()->GetRelationSet();
877 std::vector<BridgeAccessible::Relation> ret;
879 for(auto& it : relations)
880 ret.emplace_back(Relation{static_cast<uint32_t>(it.relationType), it.targets});