Forum Discussion
Gray letters in Alt text
Storyline captures the content ( of a textfield ) or the original name ( of an image ..eg. image.png ) and uses that as default for its accessibility name. When it is unchanged by the user and thus uses the default it is gray.
You can edit the accessibility name to whatever suits you...then it changes to a non-gray colour.
Accessibility names in Storyline act as lists. So when you enter eg. 'object green a1' and on another element in your Storyline... 'object green a2'
you can use querySelectors to get either all or some specific one of these elements.
For example:
4 elements in your Storyline with these acc-names:'obj green a1'
'obj blue a2'
'obj blue a3'
'obj grey a4'
To select all...let allObjs = document.querySelectorAll("[data-acc-text*='obj']");
remember its an HTMLCollection so you need to use a for loop to process all.
To select only the blue objects:let blueObjects = document.querySelectorAll("[data-acc-text*='obj blue']");
or to select a single object, for example obj blue a2:let singleblueElement = document.querySelector("[data-acc-text='obj blue a2']");
Do notice that using spaces in the accessibility names makes a list out of them...
and that the selectors used differ... querySelectorAll + *=
for selecting all with a specific name...
and querySelector + =
for selecting a single element.
Kind regards,
Math
Related Content
- 10 months ago
- 10 months ago