diff --git a/core/modules/system/src/Tests/Update/SiteLogoAltTitleAddedTest.php b/core/modules/system/src/Tests/Update/SiteLogoAltTitleAddedTest.php new file mode 100644 index 0000000..fcd702b --- /dev/null +++ b/core/modules/system/src/Tests/Update/SiteLogoAltTitleAddedTest.php @@ -0,0 +1,58 @@ +databaseDumpFiles = [ + __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', + ]; + } + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->themeHandler = $this->container->get('theme_handler'); + } + + /** + * Tests system_update_8302(). + */ + public function testSiteLogoAltTitleAdded() { + $this->runUpdates(); + $this->themeHandler->refreshInfo(); + + // Check that the global theme settings have the expected values after the + // update. + $this->assertEqual($this->config('system.theme.global')->get('logo.alt'), 'Home'); + $this->assertEqual($this->config('system.theme.global')->get('logo.title'), 'Home'); + + // Check that each enabled theme has the exepected valuesafter the update. + foreach ($this->themeHandler->listInfo() as $theme) { + $this->assertEqual($this->config($theme->getName() . '.settings')->get('logo.alt'), 'Home'); + $this->assertEqual($this->config($theme->getName() . '.settings')->get('logo.title'), 'Home'); + } + } + +} diff --git a/core/themes/classy/templates/block/block--system-branding-block.html.twig b/core/themes/classy/templates/block/block--system-branding-block.html.twig index 7c03c2f..d24baf9 100644 --- a/core/themes/classy/templates/block/block--system-branding-block.html.twig +++ b/core/themes/classy/templates/block/block--system-branding-block.html.twig @@ -11,6 +11,8 @@ * - site_logo: Logo for site as defined in Appearance or theme settings. * - site_name: Name for site as defined in Site information settings. * - site_slogan: Slogan for site as defined in Site information settings. + * - site_logo_alt: The alt attribute text for the site logo. + * - site_logo_title: The title attribute text for the site logo. */ #} {% block content %} diff --git a/core/themes/stable/templates/block/block--system-branding-block.html.twig b/core/themes/stable/templates/block/block--system-branding-block.html.twig index c2dc2b6..67e35c6 100644 --- a/core/themes/stable/templates/block/block--system-branding-block.html.twig +++ b/core/themes/stable/templates/block/block--system-branding-block.html.twig @@ -11,6 +11,8 @@ * - site_logo: Logo for site as defined in Appearance or theme settings. * - site_name: Name for site as defined in Site information settings. * - site_slogan: Slogan for site as defined in Site information settings. + * - site_logo_alt: The alt attribute text for the site logo. + * - site_logo_title: The title attribute text for the site logo. */ #} {% block content %}