GTK3: Adding accessible-label to an image button

=?windows-1250?Q?Peter_V=E1gner?= <[email protected]>
Newsgroups gmane.comp.gnome.accessibility.general
Message-ID <[email protected]>
Hello,
Now I am trying to understand how to add an accessible label to a button 
with an icon instead of a label. My aim is to make the button label 
invisible, show the icon and set only the accessible-label property.

First I have tryed adding an accessible child to the button as follows 
however this is still in accessible to orca:


               <object class="GtkToolButton" id="play-button">
                 <property name="use_action_appearance">False</property>
                 <property name="related_action">play-action</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="icon_widget">play-image</property>
                 <child internal-child="accessible">
                   <object class="AtkObject" id="play-button-atkobject">
                     <property name="AtkObject::accessible-name" 
translatable="yes">Play</property>
                   </object>
                 </child>
               </object>


Second I have tried adding accessible child to the image like this 
however this is still inaccessible while using orca:

               <object class="GtkToolButton" id="play-button">
                 <property name="use_action_appearance">False</property>
                 <property name="related_action">play-action</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="icon_widget">play-image</property>
               </object>

and somewhere else where the image is found in the definitions...

   <object class="GtkImage" id="play-image">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="icon_name">media-playback-start-symbolic</property>
     <child internal-child="accessible">
       <object class="AtkObject" id="play-image-atkobject">
         <property name="AtkObject::accessible-name" translatable="yes" 
context="Media controls">Play</property>
       </object>
     </child>
   </object>


Unfortunatelly while testing both the examples with orca the button is 
not accessible. Can you please explain the issue to me and / or point me 
to where I can study why this is failing for me?

Greetings

Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.