chiark / gitweb /
templates: use an empty alt for navbar brand image.
authorVladimír Vondruš <mosra@centrum.cz>
Fri, 8 May 2020 15:01:01 +0000 (17:01 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Fri, 8 May 2020 15:16:59 +0000 (17:16 +0200)
Helps screen readers (and textual browsers) ignore the image as
non-essential. Another variant would be putting some text there, but
since the brand name is right after, it would be superfluous, not
giving any additional information.

documentation/templates/doxygen/base.html
documentation/templates/python/base.html
documentation/test_doxygen/layout_navbar_project_logo/index.html
documentation/test_doxygen/layout_navbar_project_logo_main_project_url/index.html
documentation/test_python/layout_project_logo/index.html
documentation/test_python/layout_project_logo_main_project_url/index.html
pelican-theme/templates/base.html
pelican-theme/test/layout_brand_logo/index.html
pelican-theme/test/layout_html_escape/index.html

index 39ea7c26cf233935e3bb9fbbdc9b6be8757c8b5f..30477a99d468284c684073d489e75fb26bf2475e 100644 (file)
     <div class="m-row">
       {% if M_MAIN_PROJECT_URL and PROJECT_BRIEF %}
       <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
-        <a href="{{ M_MAIN_PROJECT_URL }}">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|basename_or_url|e }}" />{% endif %}{{ PROJECT_NAME }}</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">{{ PROJECT_BRIEF }}</a>
+        <a href="{{ M_MAIN_PROJECT_URL }}">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|basename_or_url|e }}" alt="" />{% endif %}{{ PROJECT_NAME }}</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">{{ PROJECT_BRIEF }}</a>
       </span>
       {% else %}
-      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|basename_or_url|e }}" />{% endif %}{{ PROJECT_NAME }}{% if PROJECT_BRIEF %} <span class="m-thin">{{ PROJECT_BRIEF }}</span>{% endif %}</a>
+      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|basename_or_url|e }}" alt="" />{% endif %}{{ PROJECT_NAME }}{% if PROJECT_BRIEF %} <span class="m-thin">{{ PROJECT_BRIEF }}</span>{% endif %}</a>
       {% endif %}
       {% if M_LINKS_NAVBAR1 or M_LINKS_NAVBAR2 or not M_SEARCH_DISABLED %}
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
index 54162563ab2713ac186d7e08d67b9544939f1e14..797186980b6ba37515e3ee776f78e209d3f5fe3d 100644 (file)
     <div class="m-row">
       {% if MAIN_PROJECT_URL and PROJECT_SUBTITLE %}
       <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
-        <a href="{{ MAIN_PROJECT_URL }}">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|format_url|e }}" />{% endif %}{{ PROJECT_TITLE }}</a> <span class="m-breadcrumb">|</span> <a href="{{ 'index'|path_to_url }}" class="m-thin">{{ PROJECT_SUBTITLE }}</a>
+        <a href="{{ MAIN_PROJECT_URL }}">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|format_url|e }}" alt="" />{% endif %}{{ PROJECT_TITLE }}</a> <span class="m-breadcrumb">|</span> <a href="{{ 'index'|path_to_url }}" class="m-thin">{{ PROJECT_SUBTITLE }}</a>
       </span>
       {% else %}
-      <a href="{{ 'index'|path_to_url }}" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|format_url|e }}" />{% endif %}{{ PROJECT_TITLE }}{% if PROJECT_SUBTITLE %} <span class="m-thin">{{ PROJECT_SUBTITLE }}</span>{% endif %}</a>
+      <a href="{{ 'index'|path_to_url }}" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">{% if PROJECT_LOGO %}<img src="{{ PROJECT_LOGO|format_url|e }}" alt="" />{% endif %}{{ PROJECT_TITLE }}{% if PROJECT_SUBTITLE %} <span class="m-thin">{{ PROJECT_SUBTITLE }}</span>{% endif %}</a>
       {% endif %}
       {% if LINKS_NAVBAR1 or LINKS_NAVBAR2 or not SEARCH_DISABLED %}
       <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
index cdcf657448f6fb680de0cff8d421e37e19971313..1869ee8490640da0df512d2e56b486440d6739da 100644 (file)
@@ -11,7 +11,7 @@
 <header><nav id="navigation">
   <div class="m-container">
     <div class="m-row">
-      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m"><img src="mosra.jpg" />Your Brand</a>
+      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m"><img src="mosra.jpg" alt="" />Your Brand</a>
     </div>
   </div>
 </nav></header>
index cd8cdf1dc77f52008b65d41ab262e16afc00fdf3..7f6c66ccca30c01e80ab9a6bbf09764823af6317 100644 (file)
@@ -12,7 +12,7 @@
   <div class="m-container">
     <div class="m-row">
       <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
-        <a href="http://your.brand"><img src="mosra.jpg" />Your Brand</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">docs</a>
+        <a href="http://your.brand"><img src="mosra.jpg" alt="" />Your Brand</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">docs</a>
       </span>
     </div>
   </div>
index b6902a108ee241acc2d4c8632acd219ae3914a3b..0111ee833aeb5639d83ebac5bb9eaffe5217ac5f 100644 (file)
@@ -11,7 +11,7 @@
 <header><nav id="navigation">
   <div class="m-container">
     <div class="m-row">
-      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m"><img src="mosra.jpg" />My Python Project</a>
+      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m"><img src="mosra.jpg" alt="" />My Python Project</a>
     </div>
   </div>
 </nav></header>
index cbd1618ef24e1ed6e4836a34c5d3002f64cc2424..1659179eb3dee78c1f5d660459cebd1800618a7c 100644 (file)
@@ -12,7 +12,7 @@
   <div class="m-container">
     <div class="m-row">
       <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
-        <a href="http://your.brand"><img src="mosra.jpg" />My Python Project</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">docs</a>
+        <a href="http://your.brand"><img src="mosra.jpg" alt="" />My Python Project</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">docs</a>
       </span>
     </div>
   </div>
index 9c602e40ff361571cb776cf55ee96fdf5a797408..e354ae6f1032e66327a77dd798f9c4fa3357596a 100644 (file)
@@ -47,7 +47,7 @@
   <div class="m-container">
     <div class="m-row">
       <a href="{{ SITEURL }}/" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m{% if page and page.landing and page.cover and page.hide_navbar_brand == 'True' %} m-navbar-brand-hidden{% endif %}">
-        {%- if M_SITE_LOGO %}<img src="{{ M_SITE_LOGO|format_siteurl|e }}" />{% endif -%}
+        {%- if M_SITE_LOGO %}<img src="{{ M_SITE_LOGO|format_siteurl|e }}" alt="" />{% endif -%}
         {{- (M_SITE_LOGO_TEXT or SITENAME)|e -}}
       </a>
       {% if M_LINKS_NAVBAR1 or M_LINKS_NAVBAR2 %}
index 0f2fc92e481271fe0e952af5644a9ca9825495da..53d99075d08f278fe5f8def967481792d659aa4a 100644 (file)
@@ -18,7 +18,7 @@
 <header><nav id="navigation">
   <div class="m-container">
     <div class="m-row">
-      <a href="./" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m"><img src="mosra.jpg" />A Pelican Blog</a>
+      <a href="./" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m"><img src="mosra.jpg" alt="" />A Pelican Blog</a>
     </div>
   </div>
 </nav></header>
index 8a2a7bc54817a77fbb40d181cda3fbef7ec0d4ff..f9a201161b05a59a3fd0594a1c79087fb99f25c8 100644 (file)
@@ -18,7 +18,7 @@
 <header><nav id="navigation">
   <div class="m-container">
     <div class="m-row">
-      <a href="./" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m"><img src="image.png?and&amp;in&amp;url=&#34;&#34;" />&lt;&amp;&gt;</a>
+      <a href="./" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m"><img src="image.png?and&amp;in&amp;url=&#34;&#34;" alt="" />&lt;&amp;&gt;</a>
       <a id="m-navbar-show" href="#navigation" title="Show navigation" class="m-col-t-3 m-hide-m m-text-right"></a>
       <a id="m-navbar-hide" href="#" title="Hide navigation" class="m-col-t-3 m-hide-m m-text-right"></a>
       <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">