[AppKit] Add missing Accessibility protocols. - #7105
Conversation
This commit adds a few protocols that were missing. It is interesting to mention that there are two of the protocols that are decorated with NS_PROTOCOL_REQUIRES_EXPLICIT_IMPLEMENTATION, as per Apple documentation this means that: 'Unlike normal protocols, when you adopt one of the role-specific protocols, Xcode may ask you to reimplement methods that have already been implemented by one of your ancestors. In order to ensure that your control returns accurate and useful information, some methods are tagged with the NS_PROTOCOL_REQUIRES_EXPLICIT_IMPLEMENTATION attribute. For these methods, you need to override your superclass’s implementation with your own. ' In this case, we need to add the methods from all the parent classes and set them to be [Abstract] since they are required. Not all methods have to be added ONLY the required ones. fixes: dotnet#7079
|
Documentation supporting the changes: https://developer.apple.com/library/archive/documentation/Accessibility/Conceptual/AccessibilityMacOSX/ImplementingAccessibilityforCustomControls.html |
|
build |
spouliot
left a comment
There was a problem hiding this comment.
Want to check the API diff before approving
|
|
||
| [Mac (10,10)] | ||
| [Protocol] | ||
| interface NSAccessibilityOutline : NSAccessibilityTable { |
There was a problem hiding this comment.
normally that would break things... but since there's no [BaseType] I have the feeling that this was never generated
There was a problem hiding this comment.
It was never, correct.
| interface NSAccessibilityOutline : NSAccessibilityTable { | ||
| [Abstract] | ||
| [NullAllowed, Export ("accessibilityLabel")] | ||
| new string AccessibilityLabel { get; } |
There was a problem hiding this comment.
Why re-define it (and others) ?
This is an interface so it inherits the same member from NSAccessibilityTable, so the contract remains the same.
There was a problem hiding this comment.
Removing, if contract is the same.
|
Introspection tests are failing due to metal, I'll fix those in a diff branch. |
|
Build failure !!! Couldn't read commit file !!! |
|
@monojenkins backport to d16-4 |
This commit adds a few protocols that were missing. It is interesting to
mention that there are two of the protocols that are decorated with
NS_PROTOCOL_REQUIRES_EXPLICIT_IMPLEMENTATION, as per Apple documentation
this means that:
'Unlike normal protocols, when you adopt one of the role-specific protocols,
Xcode may ask you to reimplement methods that have already been implemented
by one of your ancestors.
In order to ensure that your control returns accurate and useful information,
some methods are tagged with the NS_PROTOCOL_REQUIRES_EXPLICIT_IMPLEMENTATION
attribute. For these methods, you need to override your superclass’s
implementation with your own.
'
In this case, we need to add the methods from all the parent classes and
set them to be [Abstract] since they are required. Not all methods have
to be added ONLY the required ones.
fixes: #7079