Thanks for reporting this. We'll file the two bugs and reply with the bug IDs.

-- Kevin


On 11/12/2026 5:36 AM, Craig Raw wrote:
Hi,

I've found two further issues in JavaFX 27, both affecting accessibility in
macOS. The first is a regression from JavaFX 26, the second appears in both
versions.

I've tried submitting to bugreport.java.com, but that site is currently
"experiencing technical difficulty." I don't have much confidence these
reports will land there anyway, so posting them here - apologies.

Thanks,
Craig


Issue 1:
-----------------

Synopsis: [macOS, Accessibility] Text fields and hyperlinks no longer
expose AXShowMenu, so their context menus can't be opened through
accessibility

Component: javafx / accessibility
OS: macOS 26 (Darwin 25.6.0), Apple silicon
JDK: Temurin 25.0.5
JavaFX: regression between 26 and 27.0.1

Description:
In JavaFX 27, TextField, TextArea and Hyperlink no longer advertise the
AXShowMenu accessibility action on macOS, so an assistive client can't open
their context menu (VoiceOver's VO-Shift-M performs AXShowMenu). In JavaFX
26 they advertised AXShowMenu, and performing it opened the control's
context menu.

The legacy path, MacAccessible.accessibilityActionNames(), adds
NSAccessibilityShowMenuAction to every role except NODE and PARENT, and
performing it reaches Node's SHOW_MENU handling, which fires
CONTEXT_MENU_REQUESTED. The NSAccessibility protocol classes don't
implement accessibilityPerformShowMenu (neither AccessibleBase nor the role
classes), so every role moved to them loses the action. Text fields moved
in JDK-8343133 and hyperlinks in JDK-8379150, both in JavaFX 27. Buttons
moved earlier (JDK-8301312) and a Button with a ContextMenu has no
AXShowMenu in JavaFX 26 or 27 either.

Implementing accessibilityPerformShowMenu in AccessibleBase, forwarding to
the existing Java-side SHOW_MENU action, would appear to restore the
previous behaviour for all migrated roles.

Steps to reproduce:
1. Run the test case below with JavaFX 26, then with JavaFX 27.0.1.
2. With the window open, list the text field's actions and perform
AXShowMenu with the JXA probe below: osascript -l JavaScript probe.js <pid>

Expected (JavaFX 26):
AXTextField actions=[AXShowMenu]; AXTextArea actions=[AXShowMenu]; AXLink
actions=[AXShowMenu]. Performing AXShowMenu on the TextField opens its
context menu (a second window appears for the process).

Actual (JavaFX 27.0.1):
AXTextField actions=[]; AXTextArea actions=[]; AXLink actions=[]. Nothing
opens.

Test case:
------------------------------------------------------------------------
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class TextFieldShowMenu extends Application {
     @Override
     public void start(Stage stage) {
         Label label = new Label("Name:");
         TextField field = new TextField();
         label.setLabelFor(field);
         TextArea area = new TextArea();
         area.setPrefRowCount(3);
         VBox root = new VBox(8, label, field, area, new Hyperlink("Link"));
         root.setPadding(new Insets(12));
         stage.setTitle("ShowMenu test");
         stage.setScene(new Scene(root, 360, 220));
         stage.show();
     }

     public static void main(String[] args) {
         launch(args);
     }
}
------------------------------------------------------------------------

Probe (probe.js, run with osascript -l JavaScript probe.js <pid>):
------------------------------------------------------------------------
ObjC.import('CoreGraphics');
function windowCount(pid) {
   return
ObjC.deepUnwrap(ObjC.castRefToObject($.CGWindowListCopyWindowInfo(1, 0)))
     .filter(function (w) { return w.kCGWindowOwnerPID == pid; }).length;
}
function run(argv) {
   var pid = parseInt(argv[0]), out = [], field = null;
   var win = Application('System Events').processes.whose({unixId:
pid})[0].windows[0];
   (function walk(e, d) {
     if (d > 10) return;
     var kids; try { kids = e.uiElements(); } catch (x) { return; }
     kids.forEach(function (k) {
       var role = ''; try { role = k.role(); } catch (x) {}
       if (/AXTextField|AXTextArea|AXLink/.test(role)) {
         out.push(role + ' actions=[' + k.actions().map(function (a) {
return a.name(); }).join(', ') + ']');
         if (role == 'AXTextField' && !field) field = k;
       }
       walk(k, d + 1);
     });
   })(win, 0);
   var before = windowCount(pid);
   try { field.actions.byName('AXShowMenu').perform(); } catch (x) {
out.push('AXShowMenu: ' + x.message); }
   delay(0.6);
   out.push('windows before/after AXShowMenu: ' + before + '/' +
windowCount(pid));
   return out.join('\n');
}
------------------------------------------------------------------------

Observed output:
JavaFX 26:     AXTextField actions=[AXShowMenu], AXTextArea
actions=[AXShowMenu], AXLink actions=[AXShowMenu]; windows before/after
AXShowMenu: 1/2
JavaFX 27.0.1: AXTextField actions=[], AXTextArea actions=[], AXLink
actions=[]; windows before/after AXShowMenu: 1/1

Workaround: none for assistive clients; the context menu is still reachable
with a right-click or Ctrl-click.


Issue 2:
------------------------

Synopsis: [macOS, Accessibility] Writing AXValue on a text field is
reported as settable but ignored

Description:
On macOS, a TextField or TextArea reports AXValue as settable, but a write
is dropped: MacAccessible.accessibilitySetValue() handles AXFocused,
AXDisclosing, AXExpanded, AXSelectedCells, AXSelectedRows and
AXSelectedTextRange, and has no case for AXValue. Assistive clients that
set a field's text (dictation and automation tools) get success and an
unchanged field. Seen on JavaFX 26 and 27.0.1. On Windows,
WinAccessible.SetValueString() already maps a UIA value write on TEXT_FIELD
and TEXT_AREA to AccessibleAction.SET_TEXT; doing the same for AXValue on
macOS would make the platforms consistent.

Steps: with the test case from the AXShowMenu report, set the TextField's
AXValue through System Events (e.g. field.value = 'abc' in JXA) and read it
back.
Expected: "abc". Actual: "" (and no error).

Reply via email to