Skip to content

Commit

Permalink
Fix AutomationProperties.HelpText on macos (#17046)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ahopper authored Sep 24, 2024
1 parent e2a07cc commit 05389af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions native/Avalonia.Native/src/OSX/automation.mm
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ - (NSString *)accessibilityTitle
return [super accessibilityTitle];
}

- (NSString *)accessibilityHelp
{
return GetNSStringAndRelease(_peer->GetHelpText());
}

- (id)accessibilityValue
{
if (_peer->IsRangeValueProvider())
Expand Down
1 change: 1 addition & 0 deletions src/Avalonia.Native/AvnAutomationPeer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ private AvnAutomationPeer(AutomationPeer inner)
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());

Expand Down
2 changes: 2 additions & 0 deletions src/Avalonia.Native/avn.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 05389af

Please sign in to comment.