2 * Copyright (c) 2022 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 "nui-view-accessible.h"
22 #include <dali/integration-api/debug.h>
25 #include "control-devel-wrap.h"
28 using namespace Dali::Toolkit;
30 using Interface = Accessibility::AtspiInterface;
31 using IntPairType = NUIViewAccessible::IntPairType;
32 using IntVectorType = NUIViewAccessible::IntVectorType;
36 void GetAttributesCallback(const char* key, const char* value, Accessibility::Attributes* attributes)
38 attributes->insert_or_assign(key, value);
41 void GetSelectedRowsColumnsCallback(int index, IntVectorType* vector)
43 vector->push_back(index);
46 using GetAttributesCallbackType = decltype(&GetAttributesCallback);
47 using GetSelectedRowsColumnsCallbackType = decltype(&GetSelectedRowsColumnsCallback);
49 } // unnamed namespace
51 // Keep this structure layout binary compatible with the respective C# structure!
52 struct NUIViewAccessible::AccessibilityDelegate
54 AccessibilityDelegate() = delete;
57 char* (*getName) (RefObject*); // 1
58 char* (*getDescription) (RefObject*); // 2
59 bool (*doAction) (RefObject*, const char*); // 3
60 std::uint64_t (*calculateStates) (RefObject*, std::uint64_t); // 4
61 int (*getActionCount) (RefObject*); // 5
62 char* (*getActionName) (RefObject*, int); // 6
63 std::uint32_t (*getInterfaces) (RefObject*); // 7
64 double (*getMinimum) (RefObject*); // 8
65 double (*getCurrent) (RefObject*); // 9
66 double (*getMaximum) (RefObject*); // 10
67 bool (*setCurrent) (RefObject*, double); // 11
68 double (*getMinimumIncrement) (RefObject*); // 12
69 bool (*isScrollable) (RefObject*); // 13
70 char* (*getText) (RefObject*, int, int); // 14
71 int (*getCharacterCount) (RefObject*); // 15
72 int (*getCursorOffset) (RefObject*); // 16
73 bool (*setCursorOffset) (RefObject*, int); // 17
74 Accessibility::Range* (*getTextAtOffset) (RefObject*, int, int); // 18
75 Accessibility::Range* (*getRangeOfSelection) (RefObject*, int); // 19
76 bool (*removeSelection) (RefObject*, int); // 20
77 bool (*setRangeOfSelection) (RefObject*, int, int, int); // 21
78 bool (*copyText) (RefObject*, int, int); // 22
79 bool (*cutText) (RefObject*, int, int); // 23
80 bool (*insertText) (RefObject*, int, const char*); // 24
81 bool (*setTextContents) (RefObject*, const char*); // 25
82 bool (*deleteText) (RefObject*, int, int); // 26
83 bool (*scrollToChild) (RefObject*, Actor*); // 27
84 int (*getSelectedChildrenCount)(RefObject*); // 28
85 Actor* (*getSelectedChild) (RefObject*, int); // 29
86 bool (*selectChild) (RefObject*, int); // 30
87 bool (*deselectSelectedChild) (RefObject*, int); // 31
88 bool (*isChildSelected) (RefObject*, int); // 32
89 bool (*selectAll) (RefObject*); // 33
90 bool (*clearSelection) (RefObject*); // 34
91 bool (*deselectChild) (RefObject*, int); // 35
92 Rect<int>* (*getRangeExtents) (RefObject*, int, int, int); // 36
93 void (*getAttributes) (RefObject*, GetAttributesCallbackType, Accessibility::Attributes*); // 37
94 char* (*getValueText) (RefObject*); // 38
95 int (*getRowCount) (RefObject*); // 39
96 int (*getColumnCount) (RefObject*); // 40
97 int (*getSelectedRowCount) (RefObject*); // 41
98 int (*getSelectedColumnCount) (RefObject*); // 42
99 Actor* (*getCaption) (RefObject*); // 43
100 Actor* (*getSummary) (RefObject*); // 44
101 Actor* (*getCell) (RefObject*, int, int); // 45
102 std::uint64_t (*getChildIndex) (RefObject*, int, int); // 46
103 IntPairType* (*getPositionByChildIndex) (RefObject*, std::uint64_t); // 47
104 char* (*getRowDescription) (RefObject*, int); // 48
105 char* (*getColumnDescription) (RefObject*, int); // 49
106 Actor* (*getRowHeader) (RefObject*, int); // 50
107 Actor* (*getColumnHeader) (RefObject*, int); // 51
108 void (*getSelectedRows) (RefObject*, GetSelectedRowsColumnsCallbackType, IntVectorType*); // 52
109 void (*getSelectedColumns) (RefObject*, GetSelectedRowsColumnsCallbackType, IntVectorType*); // 53
110 bool (*isRowSelected) (RefObject*, int); // 54
111 bool (*isColumnSelected) (RefObject*, int); // 55
112 bool (*isCellSelected) (RefObject*, int, int); // 56
113 bool (*addRowSelection) (RefObject*, int); // 57
114 bool (*addColumnSelection) (RefObject*, int); // 58
115 bool (*removeRowSelection) (RefObject*, int); // 59
116 bool (*removeColumnSelection) (RefObject*, int); // 60
117 Actor* (*getTable) (RefObject*); // 61
118 IntPairType* (*getCellPosition) (RefObject*); // 62
119 int (*getCellRowSpan) (RefObject*); // 63
120 int (*getCellColumnSpan) (RefObject*); // 64
124 NUIViewAccessible::NUIViewAccessible(Actor actor)
125 : ControlAccessible(actor)
127 DALI_ASSERT_DEBUG(mTable);
130 void NUIViewAccessible::SetAccessibilityDelegate(const AccessibilityDelegate* accessibilityDelegate)
134 DALI_LOG_ERROR("Overwriting global AccessibilityDelegate");
137 mTable = accessibilityDelegate;
140 void NUIViewAccessible::Detach()
145 std::string NUIViewAccessible::StealString(char* str)
159 T NUIViewAccessible::StealObject(T* obj)
165 ret = std::move(*obj);
172 template<Interface I, typename R, typename... Args>
173 R NUIViewAccessible::CallMethod(R (*method)(RefObject*, Args...), Args... args) const
177 DALI_LOG_ERROR("Method called on detached NUIViewAccessible[%p]", static_cast<const void*>(this));
179 if constexpr(std::is_same_v<R, void>)
185 DALI_ASSERT_DEBUG(method);
186 DALI_ASSERT_ALWAYS(GetInterfaces()[I]);
188 return method(Self().GetObjectPtr(), args...);
192 // Standard interfaces (Accessible, Action, Component)
195 std::string NUIViewAccessible::GetNameRaw() const
197 char* name = CallMethod<Interface::ACCESSIBLE>(mTable->getName);
199 return StealString(name);
202 std::string NUIViewAccessible::GetDescriptionRaw() const
204 char* description = CallMethod<Interface::ACCESSIBLE>(mTable->getDescription);
206 return StealString(description);
209 bool NUIViewAccessible::GrabHighlight()
211 bool ret = ControlAccessible::GrabHighlight();
215 // Note: Currently (2021-03-26), size negotiation between the default highlight frame
216 // and NUI Components is known to be broken (and possibly in other cases, too). Please
217 // remove this for GrabHighlight() when it is fixed.
218 auto size = Self().GetProperty<Vector2>(Actor::Property::SIZE);
219 mCurrentHighlightActor.GetHandle().SetProperty(Actor::Property::SIZE, size);
225 std::string NUIViewAccessible::GetActionName(std::size_t index) const
227 char* name = CallMethod<Interface::ACTION>(mTable->getActionName, static_cast<int>(index));
229 return StealString(name);
232 std::size_t NUIViewAccessible::GetActionCount() const
234 int count = CallMethod<Interface::ACTION>(mTable->getActionCount);
236 return static_cast<std::size_t>(count);
239 bool NUIViewAccessible::DoAction(std::size_t index)
241 return DoAction(GetActionName(index));
244 bool NUIViewAccessible::DoAction(const std::string& name)
246 return CallMethod<Interface::ACTION>(mTable->doAction, name.c_str());
249 Accessibility::States NUIViewAccessible::CalculateStates()
251 std::uint64_t states = ControlAccessible::CalculateStates().GetRawData64();
253 states = CallMethod<Interface::ACCESSIBLE>(mTable->calculateStates, states);
255 return Accessibility::States{states};
258 Accessibility::Attributes NUIViewAccessible::GetAttributes() const
260 auto attributes = ControlAccessible::GetAttributes();
262 CallMethod<Interface::ACCESSIBLE>(mTable->getAttributes, &GetAttributesCallback, &attributes);
267 Property::Index NUIViewAccessible::GetNamePropertyIndex()
269 return Property::INVALID_INDEX;
272 Property::Index NUIViewAccessible::GetDescriptionPropertyIndex()
274 return Property::INVALID_INDEX;
277 bool NUIViewAccessible::IsScrollable() const
279 return CallMethod<Interface::COMPONENT>(mTable->isScrollable);
282 bool NUIViewAccessible::ScrollToChild(Actor child)
284 return CallMethod<Interface::ACCESSIBLE>(mTable->scrollToChild, new Actor(child));
287 Accessibility::AtspiInterfaces NUIViewAccessible::DoGetInterfaces() const
289 using Interfaces = Accessibility::AtspiInterfaces;
291 Interfaces baseInterfaces;
292 Interfaces extraInterfaces;
294 // These are always implemented
295 baseInterfaces[Interface::ACCESSIBLE] = true;
296 baseInterfaces[Interface::ACTION] = true;
297 baseInterfaces[Interface::COLLECTION] = true;
298 baseInterfaces[Interface::COMPONENT] = true;
300 // We cannot use CallMethod() here as that would cause recursion.
301 // Note that the result will be cached and subsequent calls to GetInterfaces()
302 // will not involve calling this virtual method or jumping into C# code.
303 extraInterfaces = Interfaces{mTable->getInterfaces(Self().GetObjectPtr())};
305 return baseInterfaces | extraInterfaces;
312 double NUIViewAccessible::GetMinimum() const
314 return CallMethod<Interface::VALUE>(mTable->getMinimum);
317 double NUIViewAccessible::GetCurrent() const
319 return CallMethod<Interface::VALUE>(mTable->getCurrent);
322 std::string NUIViewAccessible::GetValueText() const
324 char *text = CallMethod<Interface::VALUE>(mTable->getValueText);
326 return StealString(text);
329 double NUIViewAccessible::GetMaximum() const
331 return CallMethod<Interface::VALUE>(mTable->getMaximum);
334 bool NUIViewAccessible::SetCurrent(double value)
336 return CallMethod<Interface::VALUE>(mTable->setCurrent, value);
339 double NUIViewAccessible::GetMinimumIncrement() const
341 return CallMethod<Interface::VALUE>(mTable->getMinimumIncrement);
348 std::string NUIViewAccessible::GetText(std::size_t startOffset, std::size_t endOffset) const
350 char* text = CallMethod<Interface::TEXT>(mTable->getText, static_cast<int>(startOffset), static_cast<int>(endOffset));
352 return StealString(text);
355 std::size_t NUIViewAccessible::GetCharacterCount() const
357 int count = CallMethod<Interface::TEXT>(mTable->getCharacterCount);
359 return static_cast<std::size_t>(count);
362 std::size_t NUIViewAccessible::GetCursorOffset() const
364 int offset = CallMethod<Interface::TEXT>(mTable->getCursorOffset);
366 return static_cast<std::size_t>(offset);
369 bool NUIViewAccessible::SetCursorOffset(std::size_t offset)
371 return CallMethod<Interface::TEXT>(mTable->setCursorOffset, static_cast<int>(offset));
374 Accessibility::Range NUIViewAccessible::GetTextAtOffset(std::size_t offset, Accessibility::TextBoundary boundary) const
376 Accessibility::Range* range = CallMethod<Interface::TEXT>(mTable->getTextAtOffset, static_cast<int>(offset), static_cast<int>(boundary));
378 return StealObject(range);
381 Accessibility::Range NUIViewAccessible::GetRangeOfSelection(std::size_t selectionIndex) const
383 Accessibility::Range* range = CallMethod<Interface::TEXT>(mTable->getRangeOfSelection, static_cast<int>(selectionIndex));
385 return StealObject(range);
388 bool NUIViewAccessible::RemoveSelection(std::size_t selectionIndex)
390 return CallMethod<Interface::TEXT>(mTable->removeSelection, static_cast<int>(selectionIndex));
393 bool NUIViewAccessible::SetRangeOfSelection(std::size_t selectionIndex, std::size_t startOffset, std::size_t endOffset)
395 return CallMethod<Interface::TEXT>(mTable->setRangeOfSelection, static_cast<int>(selectionIndex), static_cast<int>(startOffset), static_cast<int>(endOffset));
398 Rect<> NUIViewAccessible::GetRangeExtents(std::size_t startOffset, std::size_t endOffset, Accessibility::CoordinateType type)
400 auto rectPtr = CallMethod<Interface::TEXT>(mTable->getRangeExtents, static_cast<int>(startOffset), static_cast<int>(endOffset), static_cast<int>(type));
401 Rect<int> rect = StealObject(rectPtr);
403 return {(float)rect.x, (float)rect.y, (float)rect.width, (float)rect.height};
407 // EditableText interface
410 bool NUIViewAccessible::CopyText(std::size_t startPosition, std::size_t endPosition)
412 return CallMethod<Interface::EDITABLE_TEXT>(mTable->copyText, static_cast<int>(startPosition), static_cast<int>(endPosition));
415 bool NUIViewAccessible::CutText(std::size_t startPosition, std::size_t endPosition)
417 return CallMethod<Interface::EDITABLE_TEXT>(mTable->cutText, static_cast<int>(startPosition), static_cast<int>(endPosition));
420 bool NUIViewAccessible::InsertText(std::size_t startPosition, std::string text)
422 return CallMethod<Interface::EDITABLE_TEXT>(mTable->insertText, static_cast<int>(startPosition), text.c_str());
425 bool NUIViewAccessible::SetTextContents(std::string newContents)
427 return CallMethod<Interface::EDITABLE_TEXT>(mTable->setTextContents, newContents.c_str());
430 bool NUIViewAccessible::DeleteText(std::size_t startPosition, std::size_t endPosition)
432 return CallMethod<Interface::EDITABLE_TEXT>(mTable->deleteText, static_cast<int>(startPosition), static_cast<int>(endPosition));
436 // Selection interface
439 int NUIViewAccessible::GetSelectedChildrenCount() const
441 return CallMethod<Interface::SELECTION>(mTable->getSelectedChildrenCount);
444 Accessibility::Accessible* NUIViewAccessible::GetSelectedChild(int selectedChildIndex)
446 Actor* actor = CallMethod<Interface::SELECTION>(mTable->getSelectedChild, selectedChildIndex);
448 return actor ? Accessibility::Accessible::Get(*actor) : nullptr;
451 bool NUIViewAccessible::SelectChild(int childIndex)
453 return CallMethod<Interface::SELECTION>(mTable->selectChild, childIndex);
456 bool NUIViewAccessible::DeselectSelectedChild(int selectedChildIndex)
458 return CallMethod<Interface::SELECTION>(mTable->deselectSelectedChild, selectedChildIndex);
461 bool NUIViewAccessible::IsChildSelected(int childIndex) const
463 return CallMethod<Interface::SELECTION>(mTable->isChildSelected, childIndex);
466 bool NUIViewAccessible::SelectAll()
468 return CallMethod<Interface::SELECTION>(mTable->selectAll);
471 bool NUIViewAccessible::ClearSelection()
473 return CallMethod<Interface::SELECTION>(mTable->clearSelection);
476 bool NUIViewAccessible::DeselectChild(int childIndex)
478 return CallMethod<Interface::SELECTION>(mTable->deselectChild, childIndex);
485 int NUIViewAccessible::GetRowCount() const
487 return CallMethod<Interface::TABLE>(mTable->getRowCount);
490 int NUIViewAccessible::GetColumnCount() const
492 return CallMethod<Interface::TABLE>(mTable->getColumnCount);
495 int NUIViewAccessible::GetSelectedRowCount() const
497 return CallMethod<Interface::TABLE>(mTable->getSelectedRowCount);
500 int NUIViewAccessible::GetSelectedColumnCount() const
502 return CallMethod<Interface::TABLE>(mTable->getSelectedColumnCount);
505 Accessibility::Accessible* NUIViewAccessible::GetCaption() const
507 Actor* caption = CallMethod<Interface::TABLE>(mTable->getCaption);
509 return caption ? Accessibility::Accessible::Get(*caption) : nullptr;
512 Accessibility::Accessible* NUIViewAccessible::GetSummary() const
514 Actor* summary = CallMethod<Interface::TABLE>(mTable->getSummary);
516 return summary ? Accessibility::Accessible::Get(*summary) : nullptr;
519 Accessibility::TableCell* NUIViewAccessible::GetCell(int row, int column) const
521 Actor* cell = CallMethod<Interface::TABLE>(mTable->getCell, row, column);
523 return cell ? Accessibility::TableCell::DownCast(Accessibility::Accessible::Get(*cell)) : nullptr;
526 std::size_t NUIViewAccessible::GetChildIndex(int row, int column) const
528 std::uint64_t index = CallMethod<Interface::TABLE>(mTable->getChildIndex, row, column);
530 return static_cast<std::size_t>(index);
533 IntPairType NUIViewAccessible::GetPositionByChildIndex(std::size_t childIndex) const
535 IntPairType* position = CallMethod<Interface::TABLE>(mTable->getPositionByChildIndex, static_cast<std::uint64_t>(childIndex));
537 return StealObject(position);
540 int NUIViewAccessible::GetRowByChildIndex(std::size_t childIndex) const
542 return GetPositionByChildIndex(childIndex).first;
545 int NUIViewAccessible::GetColumnByChildIndex(std::size_t childIndex) const
547 return GetPositionByChildIndex(childIndex).second;
550 std::string NUIViewAccessible::GetRowDescription(int row) const
552 char* description = CallMethod<Interface::TABLE>(mTable->getRowDescription, row);
554 return StealString(description);
557 std::string NUIViewAccessible::GetColumnDescription(int column) const
559 char* description = CallMethod<Interface::TABLE>(mTable->getColumnDescription, column);
561 return StealString(description);
564 int NUIViewAccessible::GetRowSpan(int row, int column) const
566 Accessibility::TableCell* cell = GetCell(row, column);
568 return cell ? cell->GetCellRowSpan() : -1;
571 int NUIViewAccessible::GetColumnSpan(int row, int column) const
573 Accessibility::TableCell* cell = GetCell(row, column);
575 return cell ? cell->GetCellColumnSpan() : -1;
578 Accessibility::Accessible* NUIViewAccessible::GetRowHeader(int row) const
580 Actor* header = CallMethod<Interface::TABLE>(mTable->getRowHeader, row);
582 return header ? Accessibility::Accessible::Get(*header) : nullptr;
585 Accessibility::Accessible* NUIViewAccessible::GetColumnHeader(int column) const
587 Actor* header = CallMethod<Interface::TABLE>(mTable->getColumnHeader, column);
589 return header ? Accessibility::Accessible::Get(*header) : nullptr;
592 IntVectorType NUIViewAccessible::GetSelectedRows() const
594 IntVectorType result;
596 CallMethod<Interface::TABLE>(mTable->getSelectedRows, &GetSelectedRowsColumnsCallback, &result);
601 IntVectorType NUIViewAccessible::GetSelectedColumns() const
603 IntVectorType result;
605 CallMethod<Interface::TABLE>(mTable->getSelectedColumns, &GetSelectedRowsColumnsCallback, &result);
610 bool NUIViewAccessible::IsRowSelected(int row) const
612 return CallMethod<Interface::TABLE>(mTable->isRowSelected, row);
615 bool NUIViewAccessible::IsColumnSelected(int column) const
617 return CallMethod<Interface::TABLE>(mTable->isColumnSelected, column);
620 bool NUIViewAccessible::IsCellSelected(int row, int column) const
622 return CallMethod<Interface::TABLE>(mTable->isCellSelected, row, column);
625 bool NUIViewAccessible::AddRowSelection(int row)
627 return CallMethod<Interface::TABLE>(mTable->addRowSelection, row);
630 bool NUIViewAccessible::AddColumnSelection(int column)
632 return CallMethod<Interface::TABLE>(mTable->addColumnSelection, column);
635 bool NUIViewAccessible::RemoveRowSelection(int row)
637 return CallMethod<Interface::TABLE>(mTable->removeRowSelection, row);
640 bool NUIViewAccessible::RemoveColumnSelection(int column)
642 return CallMethod<Interface::TABLE>(mTable->removeColumnSelection, column);
645 Accessibility::Table::RowColumnSpanType NUIViewAccessible::GetRowColumnSpan(std::size_t childIndex) const
647 Accessibility::Table::RowColumnSpanType span{.success = false};
649 std::tie(span.row, span.column) = GetPositionByChildIndex(childIndex);
650 Accessibility::TableCell* cell = GetCell(span.row, span.column);
657 span.isSelected = IsCellSelected(span.row, span.column);
658 span.rowSpan = cell->GetCellRowSpan();
659 span.columnSpan = cell->GetCellColumnSpan();
665 // TableCell interface
668 Accessibility::Table* NUIViewAccessible::GetTable() const
670 Actor* table = CallMethod<Interface::TABLE_CELL>(mTable->getTable);
672 return table ? Accessibility::Table::DownCast(Accessibility::Accessible::Get(*table)) : nullptr;
675 IntPairType NUIViewAccessible::GetCellPosition() const
677 IntPairType* position = CallMethod<Interface::TABLE_CELL>(mTable->getCellPosition);
679 return StealObject(position);
682 int NUIViewAccessible::GetCellRowSpan() const
684 return CallMethod<Interface::TABLE_CELL>(mTable->getCellRowSpan);
687 int NUIViewAccessible::GetCellColumnSpan() const
689 return CallMethod<Interface::TABLE_CELL>(mTable->getCellColumnSpan);
692 Accessibility::TableCell::RowColumnSpanType NUIViewAccessible::GetCellRowColumnSpan() const
694 Accessibility::TableCell::RowColumnSpanType span{};
696 std::tie(span.row, span.column) = GetCellPosition();
697 span.rowSpan = GetCellRowSpan();
698 span.columnSpan = GetCellColumnSpan();
707 SWIGEXPORT char* SWIGSTDCALL CSharp_Dali_Accessibility_DuplicateString(const char* arg)
712 SWIGEXPORT IntPairType* SWIGSTDCALL CSharp_Dali_Accessibility_MakeIntPair(int first, int second)
714 return new IntPairType(first, second);
717 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_SetAccessibilityDelegate(const void* arg1_accessibilityDelegate, uint32_t arg2_accessibilityDelegateSize)
719 GUARD_ON_NULL_RET(arg1_accessibilityDelegate);
721 const auto* accessibilityDelegate = static_cast<const NUIViewAccessible::AccessibilityDelegate*>(arg1_accessibilityDelegate);
722 auto accessibilityDelegateSize = static_cast<std::size_t>(arg2_accessibilityDelegateSize);
725 if(accessibilityDelegateSize != sizeof(*accessibilityDelegate))
727 DALI_LOG_ERROR("SetAccessibilityDelegate error: Marshal.SizeOf<AccessibilityDelegate>()[%zu] != sizeof(AccessibilityDelegate)[%zu]\n", accessibilityDelegateSize, sizeof(*accessibilityDelegate));
728 throw std::runtime_error("SetAccessibilityDelegate error: Marshal.SizeOf<AccessibilityDelegate>() != sizeof(AccessibilityDelegate)");
731 NUIViewAccessible::SetAccessibilityDelegate(accessibilityDelegate);
732 Accessibility::Bridge::GetCurrentBridge()->SetToolkitName("nui(dali)");
736 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_DetachAccessibleObject(Dali::BaseHandle* arg1_control)
738 GUARD_ON_NULL_RET(arg1_control);
741 Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(*arg1_control);
742 if(DALI_LIKELY(control))
744 // Call detach only if accessible was created before.
745 if(DevelControl::IsAccessibleCreated(control))
747 auto* actorAccessible = Dali::Accessibility::Accessible::Get(control);
748 auto* viewAccessible = dynamic_cast<NUIViewAccessible*>(actorAccessible);
752 viewAccessible->Detach();
754 // In case someone forgot View.UnregisterDefaultLabel() before View.Dispose()...
755 Dali::Accessibility::Bridge::GetCurrentBridge()->UnregisterDefaultLabel(viewAccessible);
759 // Make that we will not create new NUIViewAccessible anymore.
760 DevelControl::EnableCreateAccessible(control, false);