%asset_type_icon%


#1

Hi Squizperts


Using the keyword %asset_type_icon% and just realised on the front-end it prints

     title="" alt=""


How does one add title and alt values to asset icons?

Cheers

(Ashish Karelia) #2

Hi,
The issue you are talking about is similar to Bug Report #5446 The %asset_type_icon% keyword markup fails accessibility. If you are on a version where this is fixed you should be able to use new keyword %asset_type_icon_url% as a workaround and construct you own img tag outta it.



Ash


(Anthony Barnes) #3

Or…


You could use the keyword modifier system to add a value to the title, or remove the attribute all together:



%asset_type_icon^replace:title="":title="Hello this is a title"%



%asset_type_icon^replace:title="":%


#4

[quote]
Or…



You could use the keyword modifier system to add a value to the title, or remove the attribute all together:



%asset_type_icon^replace:title="":title="Hello this is a title"%



%asset_type_icon^replace:title="":%

[/quote]



That should do the trick (for now?), Thanks.

I must be missing something though, according to our Matrix version this should be fixed as per the Bug Report - so why this workaround?


(Benjamin Pearson) #5

[quote]
That should do the trick (for now?), Thanks.

I must be missing something though, according to our Matrix version this should be fixed as per the Bug Report - so why this workaround?

[/quote]



Sounds like you missed something :wink: that keyword was not changed as described in the bug report and as suggested by Ash, you can use %asset_type_icon_url% to construct your own valid html tag.



Hope that helps


#6

[quote]
Sounds like you missed something :wink: that keyword was not changed as described in the bug report and as suggested by Ash, you can use %asset_type_icon_url% to construct your own valid html tag.



Hope that helps

[/quote]



Surely did… :blink: I misread that one…



Cheers for that Benjamin & for the help all.