storyline
15 TopicsStoryline custom focus control
========================================================================= Update 4th Feb 2025 Added a second argument that will determine if the target elements content will be announced to the screen reader, using the aria-live=assertive attribute. ========================================================================= There have many been times, when using Storyline to develop content, it has not been possible to get the kind of screen reader focus control that I have needed. Using layers for this can only get you so far. I developed a JavaScript function that allows you to send the screen reader focus to the text field that you want, via any trigger. Adding the following JavaScript to your projects Slide Master will make it available throughout your module: // Check if function has been defined already if (typeof window.setFocus === "undefined") { // Get reference to the Storyline Player var $player = GetPlayer(); // Set the amount of time to delay before attempting to send focus to the target element (milliseconds) 1000 = 1 second. var $interval = 200; // window.setFocus = function ($target, $announce = false) { // Get the target element, based on the passed argument setTimeout(function () { var $div = document.querySelector('[data-acc-text^="' + $target + '"]'); var $id = "acc-" + $div.dataset.modelId $div = document.getElementById($id); if($announce) { $div.setAttribute("aria-atomic", "true"); $div.setAttribute("aria-live", "assertive"); } // Send focus to target, after defined $interval $div.focus(); }, $interval); } } Once the function is defined in your Slide Master, you can then call the function on the page using a JavaScript function, which can be triggered by any Storyline trigger such as timeline start, timeline end, button click etc. // The second argument will determine if the content should // be announced to assistive technology using aria-live=assertive // This will announce the text contents to the screen reader window.setFocus("Customer in the queue", true); // This will just send focus to the element. window.setFocus("Customer in the queue", false); The first argument, which is passed in the "" quotes, is the text contents of the text field you are targeting. You do not have to include all the text, just enough to ensure it is unique. For example, if you have two text fields: "Customer in the queue talking on their phone." "Customer in the shop staring into space." Passing the words "Customer in the" would not be specific enough, as there would be two text fields found. However, passing "Customer in the queue" would send the focus to the text field that contains the text "Customer in the queue talking on their phone." The second argument (true or false) determines if the target elements contents should be announced to the screen reader when it receives focus.199Views1like9CommentsHow To Embed An ElevenLabs Conversational AI Widget Into SL360 Using JS!
Hi Heroes, It feels like something new and exciting is always around the corner in the world of generative AI technology, and this week ElevenLabs put themselves firmly in the driving seat of the agentic AI revolution with their new Conversational AI toolkit. If you haven't heard of this yet, check out this video which explains it all: https://www.youtube.com/watch?v=v-EYzZCLF48&ab_channel=ElevenLabs The interactive, animated widget that this toolkit provided is easy to embed anywhere, including directly within an Articulate Storyline 360 project slide! If you're interested in how to get started, I've written a blog post that includes all the steps, including an Execute JavaScript snippet you can use to effortlessly get your agent loaded into your activity: https://discoverelearninguk.com/how-to-set-up-elevenlabs-conversational-ai-widget-in-articulate-storyline-360/ I'm also currently experimenting with the API for the new Conversational toolkit to understand how I can implement it into my eLearning Magic Toolkit plugin for Storyline + WordPress, potentially opening the door for developing real-time voice activated automation all within a Storyline-built eLearning activity! Much more to come very soon. 🚀 --- My name's Chris Hodgson, an eLearning developer and software trainer based in the UK. I enjoy creating fun, unique, and engaging online experiences using Articulate software! Connect with me on LinkedIn - https://www.linkedin.com/in/chrishodgson44/93Views3likes0CommentsExecuteScript its not working after reload/refresh in trigger.js
Hi, We have recently upgrade the storyline latest version (Build 3.92.33293.0) and we seems some changes in javascript. Earlier we had only user.js file to each slide script calling for jump on other slides. but after upgrade we can see the ExecuteScript moved to seperate file which is trigger.js file to execute the script on case basis. we noticed that trigger.js file having ExecuteScript calling only once while we cached clear and page reload but second time we just reload page its doesn't calling ExecuteScript from trigger.js file. we have added alert into ExecuteScript function it gives prompt on first time only. Can you please look into it and provide the solutions?76Views0likes2CommentsDynamic border radius experiment
This was just a little experiment to see if I could manipulate the border radius of shapes on the slide numerically using JavaScript, and the answer is yes. Not sure of any use case, but I've always wanted to be able to control the border radius numerically in Storyline as border radius is not maintained when resizing shapes. I'm not sure if this could help as there is no easy way of targeting specific shapes in a slide without knowing their unique ID. It was a bit of fun anyway. If anybody would like to play or expand on this, go for it. What I've found so far, is it will only support solid or no outlines on shapes. When you start using other styles (dot, dash) an image is used by Storyline to achieve this. window.updateCornerRadius = function(targets, radius) { targets.forEach(function(target){ const path = document.querySelector(`[data-dv_ref="ref-${target}"] path`); if (!path) { console.error(`SVG target ${target} not found.`); return; } // Extract the bounding box of the current path const bbox = path.getBBox(); const x = bbox.x; const y = bbox.y; const width = bbox.width; const height = bbox.height; // Ensure radius doesn't exceed half the width or height radius = Math.min(radius, width / 2, height / 2); // Construct a new path data string with the updated corner radius const newPathData = ` M ${x + radius},${y} H ${x + width - radius} A ${radius},${radius} 0 0 1 ${x + width},${y + radius} V ${y + height - radius} A ${radius},${radius} 0 0 1 ${x + width - radius},${y + height} H ${x + radius} A ${radius},${radius} 0 0 1 ${x},${y + height - radius} V ${y + radius} A ${radius},${radius} 0 0 1 ${x + radius},${y} Z `; // Update the path's "d" attribute path.setAttribute("d", newPathData); }); } An example of this being called. I'm using a variable, borderRadius, change trigger. const borderRadius = getVar("borderRadius"); window.updateCornerRadius(['12','15','18','21'], borderRadius);65Views2likes2CommentsBehind the Scenes: Alternative text tip and counter
Hi there! When we released Storyline 360 Update 90 back in July, we introduced the following enhancement: When writing alt text in Storyline 360, you’ll now see a dynamic character count and a tip not to exceed 150 characters. You may be wondering why, well, check out this behind-the-scenes video! If you'd like to learn more about adding alternative text, check out Storyline 360: Adding Alternative Text for Screen Readers Thanks, Ronnie Pilman, CPACC Sr. QA Engineer II57Views5likes0Comments