LP#1268636 add expressive facet link titles
authorBill Erickson <berick@esilibrary.com>
Tue, 11 Feb 2014 14:16:09 +0000 (09:16 -0500)
committerDan Scott <dscott@laurentian.ca>
Tue, 11 Feb 2014 15:44:28 +0000 (10:44 -0500)
Let the user know exactly what clicking on a facet will do.

Thanks to Dan Scott for the suggestion.

* Note that accessibility validators may dislike the repetitive titles,
  but clearly adding them provides more information (for everyone).
  Plus, as facets pile up, there's no reasonable way to differentiate
  between all titles, anyway, without title attributes becoming too
  long and unreadable.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/result/facets.tt2

index 5f0e030..c4adc08 100644 (file)
@@ -111,9 +111,13 @@ FOR facet IN sorted_facets;
                     <div class="facet_template facet_template_selected">
                         <div class="facet">
                             [% IF new_facets.size == 0 %]
-                            <a href="[% mkurl('', {}, ['facet']) %]">[% display_value %]</a>
+                            <a
+                              title="[% l('Show all results, not just those matching this term') %]"
+                              href="[% mkurl('', {}, ['facet']) %]">[% display_value %]</a>
                             [% ELSE %]
-                            <a href="[% mkurl('', {facet => new_facets}) %]">[% display_value %]</a>
+                            <a
+                              title="[% l('Expand to also show results not matching this term') %]"
+                              href="[% mkurl('', {facet => new_facets}) %]">[% display_value %]</a>
                             [% END %]
                         </div>
                         <div class="count">([% facet_data.count %])</div>
@@ -125,7 +129,11 @@ FOR facet IN sorted_facets;
                 %]
                     <div class="facet_template">
                         <div class="facet">
-                            <a href='[% mkurl('', {facet => selected_facets.merge([param_string])}, ['page']) %]'>[% display_value %]</a>
+                            <a
+                              title="[% l('Limit to results matching this term') %]"
+                              href='[% mkurl('', {facet => selected_facets.merge([param_string])}, ['page']) %]'>
+                              [% display_value %]
+                            </a>
                         </div>
                         <div class="count">([% facet_data.count %])</div>
                     </div>