From 14eb3d30a9b3ec118f1225c992e96a3ca93c6375 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 23 Dec 2013 11:39:50 -0500 Subject: [PATCH] LP#1268636 alt tags and cleanup continued Signed-off-by: Bill Erickson Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/parts/header.tt2 | 11 +++++++++++ Open-ILS/src/templates/opac/parts/homesearch.tt2 | 2 +- .../src/templates/opac/parts/record/awards.tt2 | 23 +++++++++++----------- .../src/templates/opac/parts/record/cnbrowse.tt2 | 11 ++++++----- .../src/templates/opac/parts/record/copy_table.tt2 | 4 ++-- .../src/templates/opac/parts/record/extras.tt2 | 2 +- .../src/templates/opac/parts/record/summary.tt2 | 7 ++++--- Open-ILS/src/templates/opac/parts/result/table.tt2 | 6 +++--- 8 files changed, 39 insertions(+), 27 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/header.tt2 b/Open-ILS/src/templates/opac/parts/header.tt2 index 9a2858ca86..1d93bc403d 100644 --- a/Open-ILS/src/templates/opac/parts/header.tt2 +++ b/Open-ILS/src/templates/opac/parts/header.tt2 @@ -108,4 +108,15 @@ IF ENV.OILS_NOVELIST_URL; want_dojo = 1; END; + + # Recommend max length for image alt text is 75 for screen + # reader support / WCAG compliance. This macro trims the text + # to this length and and produces a full alt="abc" attribute. + MACRO img_alt(text) BLOCK; + IF text.length >= 75; + text = text.substr(71, text.length, '...'); + END; + text = text.replace('\s*$', ''); # remove trailing whitespace + HTML.attributes(alt => text); + END; %] diff --git a/Open-ILS/src/templates/opac/parts/homesearch.tt2 b/Open-ILS/src/templates/opac/parts/homesearch.tt2 index 6987676c83..6fce85fd97 100644 --- a/Open-ILS/src/templates/opac/parts/homesearch.tt2 +++ b/Open-ILS/src/templates/opac/parts/homesearch.tt2 @@ -1,4 +1,4 @@ diff --git a/Open-ILS/src/templates/opac/parts/record/awards.tt2 b/Open-ILS/src/templates/opac/parts/record/awards.tt2 index 915b0e03bd..d4460e87a2 100644 --- a/Open-ILS/src/templates/opac/parts/record/awards.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/awards.tt2 @@ -1,19 +1,18 @@
- - [% l('Patron Reviews:') %] -
- - -
+ + [% l('Patron Reviews:') %] +
+ + +
- - [% IF ENV.OILS_NOVELIST_URL %] -
[% l('Loading...') %]
-
- [% END %] + + [% IF ENV.OILS_NOVELIST_URL %] +
[% l('Loading...') %]
+
+ [% END %] -
diff --git a/Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2 b/Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2 index a00fbf0ea1..51ef1adf4b 100644 --- a/Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2 @@ -12,13 +12,13 @@ - [% l("<< Previous Page") %] + [% l("<< Previous Page") %] [% l("Shelf Browser") %] - [% l("Next Page >>") %] + [% l("Next Page >>") %] @@ -33,7 +33,8 @@ [% rec_attrs = {marc_xml => cn.record.marc}; PROCESS get_marc_attrs args=rec_attrs; %]
[% cn.label | html %]
diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 index f6ec522bdc..b6576cacaa 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -236,12 +236,12 @@ END; # FOREACH bib [%- more_copies_limit = 50 %] [%# TODO: config %] [%- IF ctx.copy_limit != more_copies_limit AND copies.size >= ctx.copy_limit %] [%- ELSIF ctx.copy_limit == more_copies_limit %] [%- END %] diff --git a/Open-ILS/src/templates/opac/parts/record/extras.tt2 b/Open-ILS/src/templates/opac/parts/record/extras.tt2 index f4779b0778..39baa41216 100644 --- a/Open-ILS/src/templates/opac/parts/record/extras.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/extras.tt2 @@ -85,7 +85,7 @@ arrow = arrow_right; END; %] - [% arrow %] [% extra.label %] + [% arrow %] [% extra.label | html %]
diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index c6e3b7c3ae..cc2397855b 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -46,8 +46,9 @@
[% l('place hold') %][% l('Place Hold') %] + class="no-dec"> + [% l('Place Hold') %]
[%- END -%]
@@ -65,7 +66,7 @@ [% END %]
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 5faed1dc7c..7c715763b8 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -47,10 +47,10 @@ -- 2.11.0