U4-6193 - Inserting an image into grid layout ignores alternative text

Created by Sunshine Lewis 27 Jan 2015, 16:02:18 Updated by Rick Mason 10 Jan 2018, 15:47:00

Relates to: U4-10821

When you insert content of type "Image" into the grid layout, it prompts you for the alternative text but does not actually save it.

Click to insert an image into the grid layout

select an image from the media picker (or upload one). You will be taken to the dialog where you can set the focal point and add alternative text.

Enter some alternative text and click the insert button

Save and publish

look at the page in the browser and inspect the image

I expected the text I entered to be captured as the alternative text

Instead, not only is my entered alt text not there but it repeats the caption which is redundant.

I was able to fix the issue in my local copy but I'm not familiar enough with git to figure out how to make a pull request without messing up my existing pull request for a different issue.

I've included the changes I made below.

1. lines 14-17 of src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/editors/media.controller.js ''Before''

$scope.control.value = {
           focalPoint: data.focalPoint,
           id: data.id,
           image: data.image


$scope.control.value = {
           focalPoint: data.focalPoint,
           id: data.id,
           image: data.image,
           altText: data.altText

2. line 17 of src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Media.cshtml ''Before''

<img src="@url" alt="@Model.value.caption">


<img src="@url" alt="@Model.value.altText">


Anders Brohus 27 Aug 2015, 13:12:49

This haven't been fixed yet!.. :/

Dan Sørensen 27 Aug 2015, 13:43:28

Got 7.2.6 installed and I got the same issue still.

Claus Jensen 01 Sep 2015, 08:31:37

Hi Dan,

What you need to do next time is to create your pull request in a separate branch. Then you will not be blocked from doing other PR's while waiting for the first to be accepted! :) I've tested your fixes and put them in a PR to be merged in core.

Claus Jensen 01 Sep 2015, 08:31:43

PR: https://github.com/umbraco/Umbraco-CMS/pull/784

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.2.8

Due in version: 7.3.0


Story Points: