From 093009bf1f37543d4917f495159c4df97b788700 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Wed, 5 Jan 2011 22:41:06 +0000 Subject: [PATCH] Fixed #12959 -- Added alt text to SelectFilter filter button. Thanks, acdha. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15152 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/media/js/SelectFilter2.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/django/contrib/admin/media/js/SelectFilter2.js b/django/contrib/admin/media/js/SelectFilter2.js index 4d3f406a5f..92eff2ecfa 100644 --- a/django/contrib/admin/media/js/SelectFilter2.js +++ b/django/contrib/admin/media/js/SelectFilter2.js @@ -47,8 +47,14 @@ var SelectFilter = { quickElement('h2', selector_available, interpolate(gettext('Available %s'), [field_name])); var filter_p = quickElement('p', selector_available, ''); filter_p.className = 'selector-filter'; - quickElement('img', filter_p, '', 'src', admin_media_prefix + 'img/admin/selector-search.gif'); + + var search_filter_label = quickElement('label', filter_p, '', 'for', field_id + "_input", 'style', 'width:16px;padding:2px'); + + var search_selector_img = quickElement('img', search_filter_label, '', 'src', admin_media_prefix + 'img/admin/selector-search.gif'); + search_selector_img.alt = gettext("Filter"); + filter_p.appendChild(document.createTextNode(' ')); + var filter_input = quickElement('input', filter_p, '', 'type', 'text'); filter_input.id = field_id + '_input'; selector_available.appendChild(from_box);