diff --git a/Changes.md b/Changes.md index 6be61c3..ef10270 100644 --- a/Changes.md +++ b/Changes.md @@ -5,6 +5,7 @@ Version 403.1.3 - TBR -------------------------- 1. Added tooltip to show / hide block. 2. Fix 'error: class constructors must be invoked with 'new'' - ref: https://moodle.org/mod/forum/discuss.php?d=453804. +3. Fix 'Site Logo needs Alt Text for Accessibility' - #30. Version 403.1.2 - 15/10/23 -------------------------- diff --git a/classes/output/core_renderer_toolbox.php b/classes/output/core_renderer_toolbox.php index 3a254c6..2c00302 100644 --- a/classes/output/core_renderer_toolbox.php +++ b/classes/output/core_renderer_toolbox.php @@ -38,12 +38,13 @@ trait core_renderer_toolbox { * Orchestrates the rendering of the page. */ public function render_page() { - global $CFG, $COURSE, $USER; + global $CFG, $COURSE, $SITE, $USER; $toolbox = \theme_foundation\toolbox::get_instance(); $data = new \stdClass(); $data->output = $this; + $data->sitename = format_string($SITE->shortname, true, ['context' => \context_course::instance(SITEID), "escape" => false]); $bodyclasses = []; $regionmainsettingsmenu = $this->region_main_settings_menu(); diff --git a/lang/en/theme_foundation.php b/lang/en/theme_foundation.php index a426078..46bb69b 100644 --- a/lang/en/theme_foundation.php +++ b/lang/en/theme_foundation.php @@ -261,6 +261,7 @@ $string['printlayout'] = "Print"; $string['reportlayout'] = "Report"; $string['securelayout'] = "Secure"; +$string['sitelogo'] = "Site logo"; // Breadcrumb. $string['breadcrumbheadingsub'] = 'Breadcrumb'; diff --git a/scss/theme/_navbar.scss b/scss/theme/_navbar.scss index d99a8b6..15b227f 100644 --- a/scss/theme/_navbar.scss +++ b/scss/theme/_navbar.scss @@ -53,6 +53,11 @@ } } +.navbar-brand { + padding-bottom: $nav-link-padding-y; + padding-top: $nav-link-padding-y; +} + .navbar-nav { .dropdown-menu { position: absolute; diff --git a/templates/core/loginform.mustache b/templates/core/loginform.mustache index 87bfd48..bfca019 100644 --- a/templates/core/loginform.mustache +++ b/templates/core/loginform.mustache @@ -99,7 +99,7 @@
{{#logourl}} -

{{sitename}}

+

{{#str}} sitelogo, theme_foundation {{/str}}

{{/logourl}} {{^logourl}}

{{sitename}}

diff --git a/templates/partials/navbar-secure.mustache b/templates/partials/navbar-secure.mustache index fe1c1f3..8b33a65 100644 --- a/templates/partials/navbar-secure.mustache +++ b/templates/partials/navbar-secure.mustache @@ -52,11 +52,13 @@ {{> partials/navbardrawerblocks}} {{# output.should_display_navbar_logo }} - + + {{/ output.should_display_navbar_logo }} + {{^ output.should_display_navbar_logo}} + {{ sitename }} {{/ output.should_display_navbar_logo }} - {{{ sitename }}} {{{ output.primary_menu }}} diff --git a/templates/partials/navbar.mustache b/templates/partials/navbar.mustache index 2990cb2..88476d3 100644 --- a/templates/partials/navbar.mustache +++ b/templates/partials/navbar.mustache @@ -54,13 +54,15 @@ {{#ltiauth}}