RFR: 8277497 Last column cell in the JTAble row is read as empty cell [v5]

Sergey Bylokhov serb at openjdk.java.net
Wed Dec 1 22:45:24 UTC 2021


On Wed, 1 Dec 2021 12:25:56 GMT, Artem Semenov <asemenov at openjdk.org> wrote:

>> Testing https://bugs.openjdk.java.net/browse/JDK-8271071 
>> Step to reproduce 
>> 1) Run SwingSet2 in JDK 18 ( I used b24 ) 
>> 2) Enable Voiceover. 
>> 3) Select JTable demo 
>> 4) Click any row in the table or select the first row . Observe that row is selected & VoiceOver reads the column values or navigate the columns one by one by pressing tab key. When the focus reaches the last column ( Favourite Food ) Observe that column value is read as null. If you hear the same then the bug is reproduced.
>
> Artem Semenov has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.

src/java.desktop/share/classes/javax/swing/JLabel.java line 1110:

> 1108:                     }
> 1109:                 }
> 1110:                 if ((name == null) || name.isEmpty()) {

I continue our discussion from code line above.

Why for the empty label and non-accessible image we should say "image", and not for example the "empty label" or just ignore it? 

I mean that if the icon used by the label does not have an "accessible" icon, or any other accessible component why we will try to mention it to the user?

If non-accessible component should not be mentioned to user then you do not need to add a new code here, we already have the "getAccessibleIcon" method which can be called for example from the "CAccessibility" every time we request name/description/text and it empty while the icon is not null and accessible - this will cover all  accesible components not only JLabel.

BTW it could be a SwingSet/App bug that the provided image does not have a description (similar to the common bug in html when the image tag does not have an alt).

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

PR: https://git.openjdk.java.net/jdk/pull/6538



More information about the client-libs-dev mailing list