From 33eff6e9f815d4a661601d64d282c69c1937876b Mon Sep 17 00:00:00 2001 From: Daneel Date: Fri, 27 Feb 2026 13:38:30 +0100 Subject: [PATCH] =?UTF-8?q?patches:=20QA=20round=202=20PASS=20(93.5/100)?= =?UTF-8?q?=20=E2=80=94=20final=20indentation=20fix=20+=20ChangeLog=20comm?= =?UTF-8?q?it=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...oundsForRange-for-macOS-Zoom-cursor-.patch | 50 +++++++++++-------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/patches/0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch b/patches/0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch index 98f6bea..be6b908 100644 --- a/patches/0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch +++ b/patches/0001-ns-implement-AXBoundsForRange-for-macOS-Zoom-cursor-.patch @@ -1,24 +1,34 @@ -From 3e49c04ee6996a95ead094cae9dff5e7b81a2702 Mon Sep 17 00:00:00 2001 +From a194f7d30770478d476720f86f39c9878aa63e79 Mon Sep 17 00:00:00 2001 From: Martin Sukany -Date: Fri, 27 Feb 2026 13:34:22 +0100 +Date: Fri, 27 Feb 2026 13:38:25 +0100 Subject: [PATCH] ns: implement VoiceOver accessibility (AXBoundsForRange, line nav, completions, interactive spans) -* src/nsterm.h: Add EmacsAccessibilityElement, EmacsAccessibilityBuffer, -EmacsAccessibilityModeLine, EmacsAccessibilityInteractiveSpan classes; -ns_ax_visible_run struct; new EmacsView ivars for AX tree. +* src/nsterm.h (EmacsAccessibilityElement): New base class for virtual +accessibility elements. +(EmacsAccessibilityBuffer): AXTextArea/AXTextField per Emacs window with +cached text, visible runs, and interactive span support. +(EmacsAccessibilityModeLine): AXStaticText exposing mode line content. +(EmacsAccessibilityInteractiveSpan): Focusable element for buttons, +links, completion candidates, and keymap overlays. +(ns_ax_visible_run): Maps contiguous visible buffer ranges to AX string +indices, skipping invisible text. -* src/nsterm.m: Full VoiceOver/Zoom support: -- AXBoundsForRange for macOS Zoom cursor tracking (UAZoomChangeFocus) -- EmacsAccessibilityBuffer per window (AXTextArea/AXTextField for minibuffer) -- Hybrid notification strategy: SelectedTextChanged for interruption + - braille; AnnouncementRequested for speech (char AT point, line text) -- Word granularity detection for M-f/M-b (same-line multi-char moves) -- Interactive span Tab navigation (buttons, links, completions, org-links) -- 4-fallback completion announcement chain for non-focused buffers -- Thread-safe: AX getters use cached data built on main thread -- GC-safe: all symbols registered via DEFSYM in syms_of_nsterm -- Invisible text skipping via TEXT_PROP_MEANS_INVISIBLE +* src/nsterm.m (ns_ax_buffer_text): Build accessibility string from +buffer content, skipping text hidden via TEXT_PROP_MEANS_INVISIBLE. +(ns_ax_event_is_line_nav_key): Detect C-n/C-p/Tab/backtab for line +granularity forcing. +(ns_ax_scan_interactive_spans): Forward scan for interactive text +properties (widget, button, follow-link, org-link, completion, keymap). +(ns_ax_completion_string_from_prop): Handle completion--string as plain +string or annotated cons list. +(postAccessibilityUpdates): Re-entrance-guarded dispatcher called from +ns_update_end; rebuilds AX tree on window layout changes. +(postAccessibilityNotificationsForFrame:): Hybrid notification strategy: +SelectedTextChanged for word/line/selection (VoiceOver reads correctly); +AnnouncementRequested for character moves (char AT point, correct for +evil block-cursor mode). Non-focused buffer completion announcements +via 4-step fallback chain. --- src/nsterm.h | 108 ++ src/nsterm.m | 2700 +++++++++++++++++++++++++++++++++++++++++++++++--- @@ -158,7 +168,7 @@ index 7c1ee4c..6455547 100644 diff --git a/src/nsterm.m b/src/nsterm.m -index 932d209..7c50716 100644 +index 932d209..5cd6ade 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -46,6 +46,7 @@ Updated by Christian Limpach (chris@nice.ch) @@ -2291,14 +2301,14 @@ index 932d209..7c50716 100644 + self.cachedCompletionAnnouncement = announceText; + self.cachedCompletionOverlayStart = currentOverlayStart; + self.cachedCompletionOverlayEnd = currentOverlayEnd; -+ self.cachedCompletionPoint = point; ++ self.cachedCompletionPoint = point; + } + else + { + self.cachedCompletionAnnouncement = nil; + self.cachedCompletionOverlayStart = 0; + self.cachedCompletionOverlayEnd = 0; -+ self.cachedCompletionPoint = 0; ++ self.cachedCompletionPoint = 0; + } + } + else @@ -2306,7 +2316,7 @@ index 932d209..7c50716 100644 + self.cachedCompletionAnnouncement = nil; + self.cachedCompletionOverlayStart = 0; + self.cachedCompletionOverlayEnd = 0; -+ self.cachedCompletionPoint = 0; ++ self.cachedCompletionPoint = 0; + } + } +