Ticket #754: header_dropdown_id_aria_controls.diff

File header_dropdown_id_aria_controls.diff, 2.1 KB (added by Aleksej, 11 years ago)

patch (adds aria-control and changes a class attribute to id accordingly)

  • mediagoblin/static/js/header_dropdown.js

    diff --git a/mediagoblin/static/js/header_dropdown.js b/mediagoblin/static/js/header_dropdown.js
    index 1b2fb00..3ee4622 100644
    a b  
    1717 */
    1818
    1919$(document).ready(function(){
    20   $(".header_dropdown").hide();
     20  $("#header_dropdown").hide();
    2121  $(".header_dropdown_up").hide();
    2222  $(".header_dropdown_down,.header_dropdown_up").click(function() {
    2323    $(".header_dropdown_down").toggle();
    2424    $(".header_dropdown_up").toggle();
    25     $(".header_dropdown").slideToggle();
     25    $("#header_dropdown").slideToggle();
    2626  });
    2727});
  • mediagoblin/templates/mediagoblin/base.html

    diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html
    index bbc7735..94ff046 100644
    a b  
    6565                <a href="#notifications" class="notification-gem button_action" title="Notifications">
    6666                {{ notification_count }}</a>
    6767                {% endif %}
    68                 <a href="#header" class="button_action header_dropdown_down">&#9660;</a>
    69                 <a href="#no_header" class="button_action header_dropdown_up">&#9650;</a>
     68                <a href="#header" class="button_action header_dropdown_down" aria-controls="header_dropdown">&#9660;</a>
     69                <a href="#no_header" class="button_action header_dropdown_up" aria-controls="header_dropdown">&#9650;</a>
    7070              {% elif request.user and request.user.status == "needs_email_verification" %}
    7171              {# the following link should only appear when verification is needed #}
    7272                <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
     
    8484          </div>
    8585          <div class="clear"></div>
    8686          {% if request.user and request.user.status == 'active' %}
    87             <div class="header_dropdown">
     87            <div id="header_dropdown">
    8888              <p>
    8989                <span class="dropdown_title">
    9090                  {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home',