First obvious accessibility fixes.
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 12 Dec 2012 13:33:39 +0000 (14:33 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 12 Dec 2012 13:33:39 +0000 (14:33 +0100)
apps/catalogue/templates/catalogue/book_mini_box.html
apps/catalogue/templatetags/catalogue_tags.py
apps/wolnelektury_core/templates/main_page.html
apps/wolnelektury_core/templates/superbase.html

index 731a8d3..9dd5cf0 100755 (executable)
@@ -8,14 +8,10 @@
                 {% empty %}
                     {{ book.cover.url }}
                 {% endthumbnail %}
                 {% empty %}
                     {{ book.cover.url }}
                 {% endthumbnail %}
-            " alt="Cover" class="cover" />
+            " alt="{{ author_str }} – {{ book.title }}" class="cover" />
         {% endif %}
         <div class="desc">
         {% endif %}
         <div class="desc">
-            <span class="mono author">
-                {% for name, url in related.tags.author %}
-                    {{ name }}{% if not forloop.last %}, {% endif %}
-                {% endfor %}
-            </span>
+            <span class="mono author">{{ author_str }}</span>
             <span class="title">{{ book.title }}</span>
         </div>
     </a>
             <span class="title">{{ book.title }}</span>
         </div>
     </a>
index 8cf3acf..af9bfae 100644 (file)
@@ -345,9 +345,11 @@ def book_short(context, book):
 
 @register.inclusion_tag('catalogue/book_mini_box.html')
 def book_mini(book):
 
 @register.inclusion_tag('catalogue/book_mini_box.html')
 def book_mini(book):
+    author_str = ", ".join(name
+        for name, url in book.related_info()['tags']['author'])
     return {
         'book': book,
     return {
         'book': book,
-        'related': book.related_info(),
+        'author_str': author_str,
     }
 
 
     }
 
 
index 6b7c46a..57a442e 100755 (executable)
@@ -60,8 +60,8 @@
             <li><a href="{% url publish_plan %}">{% trans "Publishing plan" %}</a></li>
             <li><a href="{% url api %}">API</a></li>
             <li><a href="{% url oaipmh %}">OAI-PMH</a></li>
             <li><a href="{% url publish_plan %}">{% trans "Publishing plan" %}</a></li>
             <li><a href="{% url api %}">API</a></li>
             <li><a href="{% url oaipmh %}">OAI-PMH</a></li>
-            <li><a href="{% url lesmianator %}">Leśmianator</a></li>
-            <li><a href="http://polski.wolnelektury.pl">Materiały do nauki j. polskiego</a></li>
+            <li><a href="{% url lesmianator %}" lang="pl">Leśmianator</a></li>
+            <li><a href="http://polski.wolnelektury.pl" lang="pl">Materiały do nauki j. polskiego</a></li>
             
         </ul>
     </div>
             
         </ul>
     </div>
         <div class="social-links">
             <a href="http://pl-pl.facebook.com/pages/Wolne-Lektury/203084073268"
                 title='Wolne Lektury @ Facebook'>
         <div class="social-links">
             <a href="http://pl-pl.facebook.com/pages/Wolne-Lektury/203084073268"
                 title='Wolne Lektury @ Facebook'>
-                <img src="{% static "img/social/f.png" %}" />
+                <img src="{% static "img/social/f.png" %}" alt="Wolne Lektury @ Facebook" />
             </a>
             <a href="http://nk.pl/profile/30441509"
                 title='Wolne Lektury @ NK'>
             </a>
             <a href="http://nk.pl/profile/30441509"
                 title='Wolne Lektury @ NK'>
-                <img src="{% static "img/social/nk.png" %}" />
+                <img src="{% static "img/social/nk.png" %}" alt="Wolne Lektury @ NK.pl" />
             </a>
         </div>
     </div>
             </a>
         </div>
     </div>
index b0067ac..ac24de3 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
 <!DOCTYPE html>
-<html prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
+<html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
        {% load cache compressed i18n %}
        {% load static from staticfiles %}
     {% load catalogue_tags reporting_stats sponsor_tags %}
        {% load cache compressed i18n %}
        {% load static from staticfiles %}
     {% load catalogue_tags reporting_stats sponsor_tags %}
@@ -42,7 +42,8 @@
         <div id="header-content">
             <div id="logo">
                 <a class="logo" href="/">
         <div id="header-content">
             <div id="logo">
                 <a class="logo" href="/">
-                <img id="logo-image" src="{% static "img/logo-neon.png" %}" /></a>
+                <img id="logo-image" src="{% static "img/logo-neon.png" %}"
+                    alt="Wolne Lektury" /></a>
             </div>
 
             <div id="tagline">
             </div>
 
             <div id="tagline">
                     {% csrf_token %}
                     <input type="hidden" name="language" value="{{ lang.0 }}" />
                     <button type="submit"
                     {% csrf_token %}
                     <input type="hidden" name="language" value="{{ lang.0 }}" />
                     <button type="submit"
+                        lang="{{ lang.0 }}"
                         class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %} mono"
                         >{{ lang.1 }}</button>
                    </form>
                         class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %} mono"
                         >{{ lang.1 }}</button>
                    </form>