![]() ![]() Create a Display Template for Image.cshtml that uses your custom class as a model, and injects alternate text accordingly.Extend ImageFile.cs with a new class that has a string property for AltText.If you search around or take a look at Alloy (one of the Episerver demo sites), you’ll see a pretty standard approach to providing alternate text in images: Alternate text is a mechanism for providing additional metadata about imagery to visually impaired users as well as providing some minimal SEO benefit for search engines. If you’re new to Episerver, or have been working in the platform for some time, you’ll inevitably come across the need to display Alternate text on Image assets. Also keep in mind that this behavior is recognized by Episerver as a bug, and may be fixed in future releases: Injecting Alt Text into Episerver ‘by the book’ I can’t take full credit for my solution because Tomas Hensrud Gulla’s solution provided me with the secret sauce: parsing XhtmlString fragments. #Alternote editor how to#Coincidentally, others in the community have written about and questioned how to solve this very issue: This hurts your accessibility score and is a detrimental impact to visually impaired users. Within Rich Text areas in Episerver, the file name is injected by default for alternate text. ![]() Last week I received a nasty bug report regarding Accessibility and Episerver. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |