Button alt text

What I’m trying to do:
I have a button in a flow panel that looks like this:
image

The app needs to be compliant accessibility standards, one of these is a screen reader.

The issue is that the button’s text field is blank, but the icon is a plus. But the screen reader doesn’t say anything when it reaches this element, is there any way that I can set the “alt_text” property of thew button, like I can with the image component?

For that matter, are there any components that should not have an alt_text property?

Edit: I’m excluding nonvisual components, like Timer, of course.

1 Like

Have you tried something like this?

anvil.js.get_dom_node(self.button_1).alt_text = 'your text'

I don’t know if this is what you are looking for, and I don’t know if this adds the property to the element you need, or its child or parent. I hope this gives you an idea about where to start looking for children or parents.

1 Like

I was actually just typing this up as something I was about to try while replying to @p.colbert! I’ll give it a go and see if it works!

It might be worth me adding a feature request though, it’d certainly be a “nice to have”!