mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Windows Accessibility: Don't set UIA_NamePropertyId of ignored elements to prevent it from being read out by Narrator
This commit is contained in:
parent
4727084838
commit
66f8af98e7
1 changed files with 7 additions and 4 deletions
|
|
@ -266,8 +266,9 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetPropertyValue (PROPERTYID propertyI
|
|||
|
||||
const auto fragmentRoot = isFragmentRoot();
|
||||
|
||||
const auto role = accessibilityHandler.getRole();
|
||||
const auto state = accessibilityHandler.getCurrentState();
|
||||
const auto role = accessibilityHandler.getRole();
|
||||
const auto state = accessibilityHandler.getCurrentState();
|
||||
const auto ignored = accessibilityHandler.isIgnored();
|
||||
|
||||
switch (propertyId)
|
||||
{
|
||||
|
|
@ -287,7 +288,7 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetPropertyValue (PROPERTYID propertyI
|
|||
VariantHelpers::setString (accessibilityHandler.getHelp(), pRetVal);
|
||||
break;
|
||||
case UIA_IsContentElementPropertyId:
|
||||
VariantHelpers::setBool (! accessibilityHandler.isIgnored() && accessibilityHandler.isVisibleWithinParent(),
|
||||
VariantHelpers::setBool (! ignored && accessibilityHandler.isVisibleWithinParent(),
|
||||
pRetVal);
|
||||
break;
|
||||
case UIA_IsControlElementPropertyId:
|
||||
|
|
@ -320,7 +321,9 @@ JUCE_COMRESULT AccessibilityNativeHandle::GetPropertyValue (PROPERTYID propertyI
|
|||
pRetVal);
|
||||
break;
|
||||
case UIA_NamePropertyId:
|
||||
VariantHelpers::setString (getElementName(), pRetVal);
|
||||
if (! ignored)
|
||||
VariantHelpers::setString (getElementName(), pRetVal);
|
||||
|
||||
break;
|
||||
case UIA_ProcessIdPropertyId:
|
||||
VariantHelpers::setInt ((int) GetCurrentProcessId(), pRetVal);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue