On Tue, 21 Nov 2023 16:32:26 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Ambarish Rapte has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   add @since 22
>
> modules/javafx.controls/src/main/java/javafx/scene/control/Spinner.java line 
> 851:
> 
>> 849:             case TEXT: {
>> 850:                 String accText = getAccessibleText();
>> 851:                 return (accText != null) ? accText : "";
> 
> Is there a better default than the empty string? What do we do for Slider and 
> other similar controls?

With this fix, a11y client app reads a spinner as,
- when accessible text is set: [Accessible Text] Spinner [Value] [Editable / 
read only]
- when accessible text is not set: Spinner [Value] [Editable / read only]

Other controls like ComboBox, ChoiceBox return the value of control when 
accessible text is not set.
If we do the same for spinner, then the Spinner gets read as:  [Value] Spinner 
[Value] [Editable / read only]
In this case the value gets read twice.

The way spinner is read when accessible text is not set, it seems Ok to skip 
accessible text when it is not set.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1291#discussion_r1401493326

Reply via email to