diff --git a/pxtblocks/fields/field_imagedropdown.ts b/pxtblocks/fields/field_imagedropdown.ts index 3aa293a0ca64..1ddf1be2ae5a 100644 --- a/pxtblocks/fields/field_imagedropdown.ts +++ b/pxtblocks/fields/field_imagedropdown.ts @@ -193,6 +193,7 @@ export class FieldImageDropdown extends FieldDropdownGrid implements FieldCustom button.setAttribute('data-value', value); buttonImg.setAttribute('data-value', value); buttonImg.setAttribute('aria-hidden', 'true'); + button.title = content.alt; button.appendChild(buttonImg); this.gridItems.push(button); buttonContainer.appendChild(button); diff --git a/pxtblocks/fields/field_images.ts b/pxtblocks/fields/field_images.ts index 3d515f61cd80..fe0da97da636 100644 --- a/pxtblocks/fields/field_images.ts +++ b/pxtblocks/fields/field_images.ts @@ -110,6 +110,7 @@ export class FieldImages extends FieldImageDropdown implements FieldCustom { button.setAttribute('data-value', value); buttonImg.setAttribute('data-value', value); buttonImg.setAttribute('aria-hidden', 'true'); + button.title = content.alt; button.appendChild(buttonImg); if (this.addLabel_) { const buttonText = this.createTextNode_(content.alt);