Hello everybody,
I'm running umbraco 7.3 on several websites, now I need to add the alt text for every image since the previous developer build these templates without alt text and left me with this accessibility problems.
I took my time to search in the forum but didn't find any working solution for my case.
So I created an image property altText as a string in the media setting section.
Then I have a template file with this section for the slideshow
Essentially when you call 'Children' on a Media folder it retrieves the images beneath using the 'Examine' index - but if you've only just added the altText property to the MediaType, that won't immediately make it available in the index. I imagine if you visit each carousel image in the backoffice and re-save it, then the altText property will become available to display..., but also if you rewrite as above, if the property doesn't exist yet it won't error! - and infact it will default to be the name of the media item - which also might be a reasonable altText fallback and is guaranteed to be populated!
alt text on image
Hello everybody, I'm running umbraco 7.3 on several websites, now I need to add the alt text for every image since the previous developer build these templates without alt text and left me with this accessibility problems.
I took my time to search in the forum but didn't find any working solution for my case.
So I created an image property altText as a string in the media setting section.
Then I have a template file with this section for the slideshow
I tried
But I only get a runtime error from the server
any help would be appreciated, sorry for bad english
Alessandro
Hi Alessandro
I'm wondering if this would work for you...
Essentially when you call 'Children' on a Media folder it retrieves the images beneath using the 'Examine' index - but if you've only just added the altText property to the MediaType, that won't immediately make it available in the index. I imagine if you visit each carousel image in the backoffice and re-save it, then the altText property will become available to display..., but also if you rewrite as above, if the property doesn't exist yet it won't error! - and infact it will default to be the name of the media item - which also might be a reasonable altText fallback and is guaranteed to be populated!
regards
Marc
Unfortunately this solution trigger a "/ server error" as well ://
Hi Marc,
I'll try your code, I understand your point, honestly not being a developer but just a webdesigner I really appreciate your help
Hello have you tried ? :)
This solution trigger a "/ server error"
What media picker are you using for the images?
https://our.umbraco.com/documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Media-Picker/
you mean this?
no solution for this? :/
is working on a reply...