Unverified Commit 056e61b8 authored by larowlan's avatar larowlan
Browse files

Issue #2938170 by navneet0693, andrewmacpherson, markconroy, owenpm3,...

Issue #2938170 by navneet0693, andrewmacpherson, markconroy, owenpm3, larowlan: Enable ALT text for Banner Block image field
parent 409b3933
......@@ -22,8 +22,8 @@ settings:
max_filesize: ''
max_resolution: ''
min_resolution: ''
alt_field: false
alt_field_required: true
alt_field: true
alt_field_required: false
title_field: false
title_field_required: false
default_image:
......
......@@ -310,6 +310,7 @@ protected function importBlockContent() {
],
'field_banner_image' => [
'target_id' => $this->createFileEntity($module_path . '/default_content/images/veggie-pasta-bake-hero-umami.jpg'),
'alt' => 'Mouth watering vegetarian pasta bake with rich tomato sauce and cheese toppings',
],
],
];
......
......@@ -99,6 +99,8 @@ protected function assertImportedCustomBlock(EntityStorageInterface $block_stora
$assert = $this->assertSession();
$this->drupalGet('/recipes');
$assert->pageTextContains('Super easy vegetarian pasta bake');
$img_alt_text = $assert->elementExists('css', '#block-umami-banner-recipes img')->getAttribute('alt');
$this->assertEquals('Mouth watering vegetarian pasta bake with rich tomato sauce and cheese toppings', $img_alt_text);
$count = $block_storage->getQuery()
->condition('type', 'banner_block')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment