On Thu, 2 Dec 2021 00:00:35 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> 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).
>
> Looks like If the change will be done in the "CAccessibility" it will cover 
> the custom components as well.

Thank you. We’ve considered your suggestion and found it reasonable. Indeed, it 
should be enough here to propagate the icon’s accessible name when it exists. 
Also, we will change SwingSet2 so that those icons had accessible names.

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

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

Reply via email to