Browse code

Bug #17880: Add ALT text to donation banner.

Arthur Edelstein authored on20/12/2015 20:07:03
Showing1 changed files
... ...
@@ -18,16 +18,25 @@
18 18
   </a>
19 19
 </div>
20 20
 
21
+#include "head.wmi" TITLE="Tor Project: Anonymity Online" CHARSET="UTF-8"
22
+
23
+<!-- Script for populating the donation banner. -->
21 24
 <script>
22 25
   <!-- Show a different champion at random. -->
23 26
   var alternates = ["cd", "lp", "rd", "rr", "ss"];
27
+  var altTexts = {
28
+     "cd" : '"Privacy and anonymity matter to all of us." -- Cory Doctorow, Novelist, Technology Activist, Co-Editor of Boing Boing',
29
+     "lp" : '"Edward Snowden would not have been able to contact me without Tor and other free software encryption projects. Tor is an essential tool, and it needs our support." -- Laura Poitras, Oscar-winning Documentary Filmmaker, Citizenfour',
30
+     "rd" : '"Please help the strongest privacy tool in the world become more sustainable!" -- Roger Dingledine, Founder, The Tor Project',
31
+     "rr" : '"The internet cannot heal itself in the face of tyrants. Tor is the salve that heals that wound; Tor is what allows us to route around Tyranny." -- Rabbi Rob Thomas, Director of The Tor Project',
32
+     "ss" : '"Tor is an essential part of the internet freedom infrastructure." -- Shari Steele, Executive Director of the Tor Project',
33
+  };
24 34
   var alternate = alternates[Math.floor(Math.random() * alternates.length)];
25 35
   var image = document.getElementById("donation-banner-image");
26 36
   image.src = "images/homepage-banner-" + alternate + ".jpg";
37
+  image.alt = altTexts[alternate];
27 38
 </script>
28 39
 
29
-#include "head.wmi" TITLE="Tor Project: Anonymity Online" CHARSET="UTF-8"
30
-
31 40
 <div id="home">
32 41
     <div id="content" class="clearfix">
33 42
     	<div id="maincol">