On Mon, 21 Jul 2025 07:14:59 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:

> Ok, let's step away from the documentation and try to focus on the use case 
> of this method. Method is supposed to expose navigation within the text 
> component to the assistive technology devices and programs. One of such 
> programs (not the only one) is a text narrator. These narrators are meant to 
> be used on text components and they have special shortcuts to narrate the 
> previous and next word or character compared to the current caret position.

Those narrators should not use the AccessibleText interface blindly. Instead, 
they should check the specification and decide which methods to call and when. 
The method in question cannot return the first or last word in some scenarios, 
so relying on it without understanding its limitations could lead to incorrect 
behavior.

> The documentation needs to be corrected as well as implementation - first of 
> all it does not take into account bidirectional text and i think that might 
> be a problem - but the fix here doing the right thing regarding physical 
> meaning of this interface in the context of accessibility.

The proposed solution is not backward compatible, may cause exceptions in 3p 
code, and does not follow the pattern used in other components that implement 
AccessibleText.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25941#issuecomment-3095624540

Reply via email to