- auto control = Dali::Toolkit::Control::DownCast(Self());
-
- Internal::Control& internalControl = Toolkit::Internal::GetImplementation(control);
- Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get(internalControl);
- if(controlImpl.mAccessibilityRole == Dali::Accessibility::Role::UNKNOWN)
- {
- controlImpl.mAccessibilityRole = role;
- }
-
- Self().PropertySetSignal().Connect(&controlImpl, [this, &controlImpl](Dali::Handle& handle, Dali::Property::Index index, Dali::Property::Value value) {
- if(this->Self() != Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor())
- {
- return;
- }
-
- if(index == DevelControl::Property::ACCESSIBILITY_NAME || (index == GetNamePropertyIndex() && controlImpl.mAccessibilityName.empty()))
- {
- if(controlImpl.mAccessibilityGetNameSignal.Empty())
- {
- Emit(Dali::Accessibility::ObjectPropertyChangeEvent::NAME);
- }
- }
-
- if(index == DevelControl::Property::ACCESSIBILITY_DESCRIPTION || (index == GetDescriptionPropertyIndex() && controlImpl.mAccessibilityDescription.empty()))
- {
- if(controlImpl.mAccessibilityGetDescriptionSignal.Empty())
- {
- Emit(Dali::Accessibility::ObjectPropertyChangeEvent::DESCRIPTION);
- }
- }
- });