Bug 286928

Summary: AX: move definition of Mac NSAccessibility constants to a common header file, remove guards
Product: WebKit Reporter: Dominic Mazzoni <dm_mazzoni>
Component: AccessibilityAssignee: Dominic Mazzoni <dm_mazzoni>
Status: RESOLVED FIXED    
Severity: Normal CC: andresg_22, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Dominic Mazzoni
Reported 2025-02-03 08:34:00 PST
To make it easier to identify and audit all of the accessibility constants in WebKit, move the definition of NSAccessibility constants to a common header file and remove guards. We currently have definitions like this in a few different files: #ifndef NSAccessibilityCurrentStateChangedNotification #define NSAccessibilityCurrentStateChangedNotification @"AXCurrentStateChanged" #endif The #ifndef guard is misleading because it implies that it's preventing us from redefining a constant defined in a system header. But in fact, most system-defined accessibility constants are symbols, so the #ifndef isn't doing anything, and we were in fact redefining some symbol names before being deleted in a previous change. As a follow-up I think we should consider switching to symbols for these constants in WebKit because then we'd get a linker error if we duplicate a system symbol.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-02-03 08:34:23 PST
Dominic Mazzoni
Comment 2 2025-02-03 08:52:31 PST
EWS
Comment 3 2025-02-04 17:53:38 PST
Committed 289842@main (9644e79bbfa1): <https://commits.webkit.org/289842@main> Reviewed commits have been landed. Closing PR #39915 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.