Browse Source

Fix AutomationProperties.HelpText on macos (#17046)

* fix Automation.HelpText on windows

* fix AutomationProperties.HelpText on macos

* change breaking abstract to virtual

* only fall back to tooltip if string

* remove duplicate override

* fix AutomationProperties.HelpText on macos
pull/17115/head
ahopper 1 year ago
committed by GitHub
parent
commit
05389af98e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      native/Avalonia.Native/src/OSX/automation.mm
  2. 1
      src/Avalonia.Native/AvnAutomationPeer.cs
  3. 2
      src/Avalonia.Native/avn.idl

5
native/Avalonia.Native/src/OSX/automation.mm

@ -149,6 +149,11 @@
return [super accessibilityTitle];
}
- (NSString *)accessibilityHelp
{
return GetNSStringAndRelease(_peer->GetHelpText());
}
- (id)accessibilityValue
{
if (_peer->IsRangeValueProvider())

1
src/Avalonia.Native/AvnAutomationPeer.cs

@ -39,6 +39,7 @@ namespace Avalonia.Native
public IAvnString ClassName => _inner.GetClassName().ToAvnString();
public IAvnAutomationPeer? LabeledBy => Wrap(_inner.GetLabeledBy());
public IAvnString Name => _inner.GetName().ToAvnString();
public IAvnString HelpText => _inner.GetHelpText().ToAvnString();
public IAvnAutomationPeer? Parent => Wrap(_inner.GetParent());
public IAvnAutomationPeer? VisualRoot => Wrap(_inner.GetVisualRoot());

2
src/Avalonia.Native/avn.idl

@ -1219,6 +1219,8 @@ interface IAvnAutomationPeer : IUnknown
bool IsValueProvider();
IAvnString* ValueProvider_GetValue();
void ValueProvider_SetValue(char* value);
IAvnString* GetHelpText();
}
[uuid(b00af5da-78af-4b33-bfff-4ce13a6239a9)]

Loading…
Cancel
Save