Tool Tips on Focus

Hi Everyone,

I wish you're all doing well, safe and healthy!

Is there any way to display the tool tip of a button when it is tabbed by keyboard users? I was able to show/hide the tip with On MEnter and MExit; but, this method is not accessible.

Thanks for any help,

Therese

Discussion (6)

Hi,

Lectora has MouseEnter and MouseExit triggers but does not support focus and blur triggers. However, you can write a page level action that will set focus and blur events of the HTML elements and map them to the MouseEnter and MouseExit actions that you already have. With this, when you tab to the button, focus event will fire and then it will call the MouseEnter action function that you already setup.

Have a look at the sample title and try it out. Especially look at the page action (OnShowRunJS) which does the mapping of focus events to MouseEnter action functions. This approach only works after publishing or when you do Preview in browser. It does not work in Run Mode.

Also, note that button40, button63, etc. in the page action refer to the HTML names of buttons. You can get those by selecting the button, going to Properties tab and hover or click on the small expand arrow in the lower-right corner of the first group of controls.

Hope this fits your needs.

Robert.

undefined

Thanks for replying Carl. I didn't see the response until now.

I can't attach awt file so I'll just copy the contexts of FocusAction.awt here:

xml version="1.0" encoding="UTF-8"?undefinedlectoratitle lectorafileversion="18.2" lectoraproductversion="18.2.3" lectoraproductname="Lectora Inspire" lectoraproductcode="LD"undefined1970undefined0undefined96undefined96undefinedvariable id="1071" referenceobjectid="1068"undefinedEntry_0001undefined0undefinedtitle id="1" center="center" respdesign="true"undefined1590079193undefined000000undefined0000FFundefined1009undefined662undefined12undefinedpage id="2" parent="1"undefinedPage 1undefined1590079315undefined-1undefined0undefined10undefined0undefinedaction id="1146" parent="2" on="show"undefined1590079701undefined,button40.div).get(0).onfocus = button40onOver;undefined,button40.div).get(0).onblur = button40onOut;undefined,button63.div).get(0).onfocus = button63onOver;undefined,button63.div).get(0).onblur = button63onOut;undefined,button143.div).get(0).onfocus = button143onOver;undefined,button143.div).get(0).onblur = button143onOut;undefinedtext id="186" parent="2" ontop="false" fixed="false" proportional="false" defaulttext="none"undefined1590079836undefined426undefined161undefined200undefined80undefined100undefined1undefined0undefined999999undefined0undefinedspan.text186Font1 { font-size:16px; font-family:undefined color:#010101;}undefinedmargin-left:0px;text-indent:0px;margin-top:0px;margin-bottom:0px;text-align:left;undefinedtext186Font1undefined{\rtf1\ansi\deflang1033\ftnbj\uc1\deff1undefined{\fonttbl{\f0 \froman \fcharset0 Times New Roman;}{\f1 \fswiss Arial;}}undefined{\colortbl\red0\green0\blue0 ;\red255\green255\blue255 ;\red0\green0\blue0 ;}undefined{\stylesheet{\f1\fs24\cf0\cb1\ulc0 Normal;}{\cs1\cf0\cb1\ulc0 Default Paragraph Font;}}undefined\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\headery720\footery720\deftab360\formshade\aendnotes\aftnnrlc\pgbrdrhead\pgbrdrfootundefined\sectd\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\headery720\footery720\sbkpage\pgncont\pgndecundefined\plain\plain\f1\fs24\ql\par}undefined1undefined0undefined0undefinedtextbutton id="40" parent="2" ontop="true" fixed="false" proportional="false" initdisabled="false"undefined1590079302undefined160undefined182undefined120undefined40undefined100undefined0undefined20100undefined0undefined1undefined0963B1undefined-16undefined12undefined0undefined1undefinedcontrolpoint value="50" /undefinedshapefillinfo fillstyle="2" gradientangle="270" bevelheight="0" color="085394"undefinedgradientstop color="0064BB" value="0.000000" /undefinedgradientstop color="007CE9" value="0.500000" /undefinedgradientstop color="1994FE" value="1.000000" /undefinedaction id="45" parent="40" on="mouseenter"undefined1590079273undefinedactionitem actiontaken="changecontents" target="object" targetobject="186"undefinedaction id="1564" parent="40" on="mouseexit"undefined1590079302undefinedactionitem actiontaken="changecontents" target="object" targetobject="186"undefined20100undefinedentryfield id="1068" parent="2" ontop="false" fixed="false" proportional="false" formvar="1071"undefinedEntry_1undefined1590079759undefined162undefined482undefined150undefined24undefined100undefined40undefinedtextbutton id="63" parent="2" ontop="true" fixed="false" proportional="false" initdisabled="false"undefinedButton 2undefined1590079755undefined160undefined282undefined120undefined40undefined100undefined0undefined20100undefined0undefined1undefined0963B1undefined-16undefined12undefined0undefined1undefinedcontrolpoint value="50" /undefinedshapefillinfo fillstyle="2" gradientangle="270" bevelheight="0" color="085394"undefinedgradientstop color="0064BB" value="0.000000" /undefinedgradientstop color="007CE9" value="0.500000" /undefinedgradientstop color="1994FE" value="1.000000" /undefinedaction id="1586" parent="63" on="mouseenter"undefined1590079329undefinedactionitem actiontaken="changecontents" target="object" targetobject="186"undefinedaction id="1585" parent="63" on="mouseexit"undefined1590079308undefinedactionitem actiontaken="changecontents" target="object" targetobject="186"undefined20100undefinedtextbutton id="143" parent="2" ontop="true" fixed="false" proportional="false" initdisabled="false"undefinedButton 3undefined1590079752undefined160undefined382undefined120undefined40undefined100undefined0undefined20100undefined0undefined1undefined0963B1undefined-16undefined12undefined0undefined1undefinedcontrolpoint value="50" /undefinedshapefillinfo fillstyle="2" gradientangle="270" bevelheight="0" color="085394"undefinedgradientstop color="0064BB" value="0.000000" /undefinedgradientstop color="007CE9" value="0.500000" /undefinedgradientstop color="1994FE" value="1.000000" /undefinedaction id="1618" parent="143" on="mouseenter"undefined1590079337undefinedactionitem actiontaken="changecontents" target="object" targetobject="186"undefinedaction id="1617" parent="143" on="mouseexit"undefined1590079309undefinedactionitem actiontaken="changecontents" target="object" targetobject="186"undefined20100undefined

Thank you Robert. Could you please send me the JS as text here? I cannot unzip the file.

I copied this out of Robert's file:

triv$('button',button40.div).get(0).onfocus = button40onOver;

triv$('button',button40.div).get(0).onblur = button40onOut;

triv$('button',button63.div).get(0).onfocus = button63onOver;

triv$('button',button63.div).get(0).onblur = button63onOut;

triv$('button',button143.div).get(0).onfocus = button143onOver;

triv$('button',button143.div).get(0).onblur = button143onOut;

Yessss! It works... Thanks a million Robert and Carl...

The 508 team requested the tips for all tabbed buttons in the header (home, menu, etc.), so I put the OnShow action in the title level, and it worked great on every page.

Many thanks again. Please take care and stay safe,

Therese

What is the purpose of the Entry Field in the FocusAction file? Does it do anything?

Discussions have been disabled for this post