-
Notifications
You must be signed in to change notification settings - Fork 109
Add implementations for NSAccessibility... classes #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Implements core NSAccessibility classes and C helpers to make accessibility elements, custom rotors, and custom actions functional under manual retain/release.
- Add concrete initializers, accessors, and simple role description to NSAccessibilityElement
- Implement NSAccessibilityCustomRotor and ItemResult, plus NSAccessibilityCustomAction (with block support, perform logic, and factories)
- Provide basic NSAccessibility* C helpers for notifications and role/action descriptions
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.
Show a summary per file
File | Description |
---|---|
Source/NSAccessibilityElement.m | Implements element initializers, accessors, dealloc, and a simple role description. |
Source/NSAccessibilityCustomRotor.m | Fills in rotor and item result initializers, accessors, and dealloc. |
Source/NSAccessibilityCustomAction.m | Adds safe block retention/release, perform logic, convenience factories, and description. |
Source/NSAccessibility.m | Adds basic implementations for posting notifications and role/action description utilities. |
Headers/AppKit/NSAccessibilityElement.h | Public API and ivars for NSAccessibilityElement, including initializers and accessors. |
Headers/AppKit/NSAccessibilityCustomRotor.h | Public ivars for rotor and item result classes. |
Headers/AppKit/NSAccessibilityCustomAction.h | Declares new factory methods and perform method for custom actions. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
- (void) setAccessibilityLabel: (NSString *)label | ||
{ | ||
ASSIGN(_accessibilityLabel, label); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Setters for string attributes should copy (not just retain) to avoid surprises with mutable strings. Replace ASSIGN with ASSIGNCOPY here, and likewise in setAccessibilityIdentifier, setAccessibilityRole, and setAccessibilitySubrole.
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Updated accessibility property setters to use ASSIGNCOPY for better memory management.
I think this PR is ready as well, @fredkiefer / @rfm |
No description provided.