Curious: how is "text on focussed widget" used?

For years I’ve ignored the “text on focused widget” option in the local variables list inside the actions panel.

I can see what it does I think (takes the text of a focussed widget), but can’t for the life of me think of any practical use for it.

Is anyone using it? If so, for what?

I’ve used the “text on focused widget” extensively for prototyping accessibility tests and demonstrations. When using screen readers for websites, mobile apps, etc., the user can successively press Tab to hear each screen element announce itself, it’s type, and any associated text. Fortunately, Axure honors the ability to tab through widgets in the HTML prototypes (you just have to be careful to properly order the stack of widgets.) So, I can set a special selected styling when a widget gets focused, to show it as highlighted, and send the “text on focused widget” to a responsivevoice.js plugin to hear it read aloud.

I also find it is handy for handling text input, error-checking, limits, predictive search, etc. I will often create sub-routines or “dp functions” with repeating/looping dynamic panels that will walk through all the input fields in a form, setting focus on an input field then calling a common sub-routine to test the “text on focused widget” then go to the next field and so on.

Like most of the built-in variables and pointers in Axure, it can be great for reusable, pseudo-object-oriented code, code in Masters, and such.


Interesting - thanks!