Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No visible text on button, but needs text for screen reader?

Tags:

c#

winforms

I have a WinForm app that has a button with a background image. There is no text for the button. It just has a 'refresh' symbol on it.

Since there's no text, a screen reader can't "see" the button to indicate what it is. When I add text, though, it's over the image and looks terrible.

Is there a way in a WinForm app for a button to have hidden text visible to the screen reader, but not to the user?

like image 593
Kevin Avatar asked Feb 04 '16 14:02

Kevin


People also ask

How to make screen reader ignore text?

To hide text from a screen reader and display it visually, use the aria-hidden attribute and set it to true. To hide text from a screen reader and hide it visually use the hidden attribute. You can also use CSS to set display: none or visibility: hidden to hide an element from screen readers and visually.


1 Answers

In the properties of the button, there is an Accessibility section.

You can set the following property: AccessibilityName

I tested with a screen reader on windows 10 and it used that field when hovering over a button.

button properties screenshot

like image 96
drneel Avatar answered Sep 24 '22 16:09

drneel