From 763ffe58812aba9b1e6fe2bca4bb74187ab16ea3 Mon Sep 17 00:00:00 2001
From: Anika Henke <anika@selfthinker.org>
Date: Thu, 1 Aug 2013 17:11:29 +0100
Subject: [PATCH] added aria attributes for footnote tooltips

---
 lib/scripts/page.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/scripts/page.js b/lib/scripts/page.js
index 4ab0bf9b5..7b4958d82 100644
--- a/lib/scripts/page.js
+++ b/lib/scripts/page.js
@@ -62,7 +62,9 @@ dw_page = {
             $fndiv = jQuery(document.createElement('div'))
                 .attr('id', popup_id)
                 .addClass('insitu-footnote JSpopup')
-                .mouseleave(function () {jQuery(this).hide();});
+                .attr('aria-hidden', 'true')
+                .mouseleave(function () {jQuery(this).hide().attr('aria-hidden', 'true');})
+                .attr('role', 'tooltip');
             jQuery('.dokuwiki:first').append($fndiv);
         }
 
@@ -97,7 +99,7 @@ dw_page = {
         content = content.replace(/\bid=(['"])([^"']+)\1/gi,'id="insitu__$2');
 
         // now put the content into the wrapper
-        dw_page.insituPopup(this, 'insitu__fn').html(content).show();
+        dw_page.insituPopup(this, 'insitu__fn').html(content).show().attr('aria-hidden', 'false');
     },
 
     /**
-- 
GitLab