Loss of focus on Submit buttons when hidden at any point when a course is Published
April 13, 2021 12:00 AM
I have a game-like page that has multiple questions on the page. Each Q would therefore need a unique Submit button, yet they must be "initially hidden" so that a screen reader does not pick them up (and/or read out of sequence).
When I created the page it worked in both a Run preview as well as Preview Page In (any) Browser. However, the moment the course was Published, that must have rendered the code differently as it breaks it. In short, when the course is Lectora 19 Published (HTML, SCORM etc.) the Submit buttons lose focus. Not only will they not be clickable (other than a visible mouseover state change), it will break the Accessibility focus for tab interaction.
I've recreated and attached a sample with a similar page as the broken functionality is easy to replicate. Since this HTML previews properly I'm inclined to think this is a publishing bug, as well as an Accessibility flaw, I'm still trying to find a workaround.
-Darrell
Solutions (3)
@web-foley we are looking into the issue and we'll keep you posted. Sorry about the inconvenience.
Robert.
@web-foley This replacement file is to fix: "Button that is initially hidden and disabled which fails to work after show and enabled."
This file is ONLY for Lectora version 19.0.4
Link:
https://elearningbrothers.sharefile.com/d-s362302a8216f40e5a7248576d04fc71b
Steps:
Locate your installed directory similar to: C:\Program Files (x86)\eLearningBrothers\Lectora 19\Support Files
Locate file trivantis-button.js and rename to trivantis-button.js.old
Copy the downloaded file to this folder
Rename the downloaded file to trivantis-button.js
Restart Lectora and publish titles again.
Robert.
A coworker has made some further observations. (thanks Trevor)
After selected the question distractor, It appears that the published to web version is still set to disabled… even though it doesn’t look like it. That’s why you can’t click it.
In Chrome Dev mode, when I removed the ‘disabled’ … BOOM it worked. So why is the set Button to Normal action not fully working.
If you add some Jquery to the action sequence of each of the choice buttons to clear that nagging disabled attribute.
triv$('[id*=button] button', getDisplayDocument()).removeAttr("disabled")
And strangely you only need to add them to one.
its also weird that if I remove the Enable Submit action. my code as a standalone doesnt work.
Discussion (3)
A coworker has made some further observations. (thanks Trevor)
After selected the question distractor, It appears that the published to web version is still set to disabled… even though it doesn’t look like it. That’s why you can’t click it.
In Chrome Dev mode, when I removed the ‘disabled’ … BOOM it worked. So why is the set Button to Normal action not fully working.
If you add some Jquery to the action sequence of each of the choice buttons to clear that nagging disabled attribute.
triv$('[id*=button] button', getDisplayDocument()).removeAttr("disabled")
And strangely you only need to add them to one.
its also weird that if I remove the Enable Submit action. my code as a standalone doesnt work.
@web-foley we are looking into the issue and we'll keep you posted. Sorry about the inconvenience.
Robert.
@web-foley This replacement file is to fix: "Button that is initially hidden and disabled which fails to work after show and enabled."
This file is ONLY for Lectora version 19.0.4
Link:
https://elearningbrothers.sharefile.com/d-s362302a8216f40e5a7248576d04fc71b
Steps:
Locate your installed directory similar to: C:\Program Files (x86)\eLearningBrothers\Lectora 19\Support Files
Locate file trivantis-button.js and rename to trivantis-button.js.old
Copy the downloaded file to this folder
Rename the downloaded file to trivantis-button.js
Restart Lectora and publish titles again.
Robert.