Hello,
ButtonImageGadgets are not currently accessible to screen readers, as would be expected, as they simply have images, which screen readers can't read.
It would be great if an optional parameter could be added to them, Text, similar to ButtonGadget's text, so I could tell what the buttons were, if the developer provided a Text tag.
Example:
ButtonImageGadget(0,10,30,100,120,#MyImage,"OK")
I'm not sure how visually pleasing this would look, or if the buttons is even an okay size, as I am blind, but it would be great to see!
Add an optional alt text tag to ButtonImageGadget
-
- Addict
- Posts: 4527
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Add an optional alt text tag to ButtonImageGadget
Did you try adding text to a ButtonImageGadget with GadgetToolTip()?Help for GadgetToolTip() wrote:Syntax
GadgetToolTip(#Gadget, Text$)
Description
Associate the specified Text$ with the #Gadget.
Can the sreen reader read that text properly?
Re: Add an optional alt text tag to ButtonImageGadget
Hi.
From what I've seen, gadget tooltips can read, if the setting is turned on. So this does work, however, I doubt many people will put one...
From what I've seen, gadget tooltips can read, if the setting is turned on. So this does work, however, I doubt many people will put one...
Re: Add an optional alt text tag to ButtonImageGadget
+1
This is especially important because of ide, where certain things like profiler use image buttons and all you hear is "button", "button", "button", and have no idea what's what.
Tested GadgetTooltip with two screen readers that are used the most, and neither of them reads tooltips, and even if they did, this should not be relied upon, because many people disable reading of the same because of the often needless extra verbosity.
This is especially important because of ide, where certain things like profiler use image buttons and all you hear is "button", "button", "button", and have no idea what's what.
Tested GadgetTooltip with two screen readers that are used the most, and neither of them reads tooltips, and even if they did, this should not be relied upon, because many people disable reading of the same because of the often needless extra verbosity.
Code: Select all
OpenWindow(0, 0, 0, 500, 500, "test", #PB_Window_ScreenCentered|#PB_Window_Maximize)
CreateImage(0, 32, 32)
ButtonImageGadget(0, 0, 0, 32, 32, ImageID(0))
GadgetToolTip(0, "test123")
Repeat: Until WaitWindowEvent()=#PB_Event_CloseWindow
-
- Addict
- Posts: 4527
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Add an optional alt text tag to ButtonImageGadget
Uuhm ... that sounds crazy.nsstudios wrote:This is especially important because of ide, where certain things like profiler use image buttons and all you hear is "button", "button", "button", and have no idea what's what.
Good to know. Thanks for the information.nsstudios wrote:Tested GadgetTooltip with two screen readers that are used the most, and neither of them reads tooltips, and even if they did, this should not be relied upon, because many people disable reading of the same because of the often needless extra verbosity.
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Re: Add an optional alt text tag to ButtonImageGadget
Is there a mechanism in Windows to actually do this though (apart from tootips)?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Re: Add an optional alt text tag to ButtonImageGadget
I'm not really sure, but doing a quick Google search on button with both an image and text yealds:
https://stackoverflow.com/questions/479 ... ext-buttonThe appearance of text or an icon or both on a button control depends on the BS_ICON and BS_BITMAP styles, and whether the
BM_SETIMAGE
message is sent. The possible results are as follows.
BS_ICON or BS_BITMAP set? | BM_SETIMAGE called? | Result
--------------------------+---------------------+--------------------
Yes | Yes | Show icon only.
No | Yes | Show icon and text.
Yes | No | Show text only.
No | No | Show text only
In other words: Don't set the BS_ICON or BS_BITMAP style (but do set the BS_TEXT style), and send a BM_SETIMAGE message once the button has been created.