diff --git a/inc/html.php b/inc/html.php
index 53f4c45ffefbb6219e702d92a7632fc2669aa53d..1bd1a74e48339cf84a66191b5efc1c2b6904cf91 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1492,7 +1492,7 @@ function html_edit(){
         echo 'textChanged = ' . ($mod ? 'true' : 'false');
         echo '/*!]]>*/</script>' . NL;
     } ?>
-    <div class="editBox">
+    <div class="editBox" role="application">
 
     <div class="toolbar group">
         <div id="draft__status"><?php if(!empty($INFO['draft'])) echo $lang['draftdate'].' '.dformat();?></div>
diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php
index af6f32bf4648269273c2d927ea1714ba0b08a809..aa0a3d3b2c27fde9dc1083f718dce240808f7a86 100644
--- a/inc/lang/de/lang.php
+++ b/inc/lang/de/lang.php
@@ -235,7 +235,7 @@ $lang['qb_extlink']            = 'Externer Link';
 $lang['qb_hr']                 = 'Horizontale Linie';
 $lang['qb_ol']                 = 'Nummerierter Listenpunkt';
 $lang['qb_ul']                 = 'Listenpunkt';
-$lang['qb_media']              = 'Bilder und andere Dateien hinzufügen';
+$lang['qb_media']              = 'Bilder und andere Dateien hinzufügen (öffnet sich in einem neuen Fenster)';
 $lang['qb_sig']                = 'Unterschrift einfügen';
 $lang['qb_smileys']            = 'Smileys';
 $lang['qb_chars']              = 'Sonderzeichen';
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index cdad6c9a6cc5abd2ad5020640e7c751c650183dd..00e71d254590224325d8a1e208584729069d9bc1 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -234,7 +234,7 @@ $lang['qb_extlink']            = 'External Link';
 $lang['qb_hr']                 = 'Horizontal Rule';
 $lang['qb_ol']                 = 'Ordered List Item';
 $lang['qb_ul']                 = 'Unordered List Item';
-$lang['qb_media']              = 'Add Images and other files';
+$lang['qb_media']              = 'Add Images and other files (opens in a new window)';
 $lang['qb_sig']                = 'Insert Signature';
 $lang['qb_smileys']            = 'Smileys';
 $lang['qb_chars']              = 'Special Chars';
diff --git a/inc/template.php b/inc/template.php
index b8129f914c590509b338c1a44c4578e12c65caac..7309c9b32280360a9f1c378c66bb787b03c816f6 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -764,7 +764,7 @@ function tpl_searchform($ajax = true, $autocomplete = true) {
     // don't print the search form if search action has been disabled
     if(!actionOK('search')) return false;
 
-    print '<form action="'.wl().'" accept-charset="utf-8" class="search" id="dw__search" method="get"><div class="no">';
+    print '<form action="'.wl().'" accept-charset="utf-8" class="search" id="dw__search" method="get" role="search"><div class="no">';
     print '<input type="hidden" name="do" value="search" />';
     print '<input type="text" ';
     if($ACT == 'search') print 'value="'.htmlspecialchars($QUERY).'" ';
diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js
index c3763dc8d39f11dc1744c7493e871de642d67190..0abb80d671d7ac3afdfcefcd573dd29620d3a692 100644
--- a/lib/plugins/acl/script.js
+++ b/lib/plugins/acl/script.js
@@ -61,6 +61,7 @@ var dw_acl = {
      */
     loadinfo: function () {
         jQuery('#acl__info')
+            .attr('role', 'alert')
             .html('<img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="..." />')
             .load(
                 DOKU_BASE + 'lib/plugins/acl/ajax.php',
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index f1c46bf4c2fe0b9d92d4426854b337787b4903ba..85ddf503ed69dab228f91de370cc2e723d5ff13b 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -5,6 +5,7 @@
  * @author Adrian Lang <mail@adrianlang.de>
  */
 jQuery.fn.dw_hide = function(fn) {
+    this.attr('aria-expanded', 'false');
     return this.slideUp('fast', fn);
 };
 
@@ -15,6 +16,7 @@ jQuery.fn.dw_hide = function(fn) {
  * @author Adrian Lang <mail@adrianlang.de>
  */
 jQuery.fn.dw_show = function(fn) {
+    this.attr('aria-expanded', 'true');
     return this.slideDown('fast', fn);
 };
 
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 5a5e829bd9d6359dbea2aa95b91a8990a8dfa43d..b1dbff683c655247d9e0c88e263bf30321be94c8 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -23,7 +23,7 @@ function createToolButton(icon,label,key,id,classname){
         $btn.addClass(classname);
     }
 
-    $btn.attr('title', label);
+    $btn.attr('title', label).attr('aria-controls', 'wiki__text');
     if(key){
         $btn.attr('title', label + ' ['+key.toUpperCase()+']')
             .attr('accessKey', key);
@@ -40,6 +40,7 @@ function createToolButton(icon,label,key,id,classname){
         icon = DOKU_BASE + 'lib/images/toolbar/' + icon;
     }
     $ico.attr('src', icon);
+    $ico.attr('alt', '');
     $ico.attr('width', 16);
     $ico.attr('height', 16);
     $btn.append($ico);
@@ -76,6 +77,7 @@ function createPicker(id,props,edid){
     function $makebutton(title) {
         var $btn = jQuery(document.createElement('button'))
             .addClass('pickerbutton').attr('title', title)
+            .attr('aria-controls', edid)
             .bind('click', bind(pickerInsert, title, edid))
             .appendTo($picker);
         return $btn;
@@ -93,6 +95,7 @@ function createPicker(id,props,edid){
             }
             jQuery(document.createElement('img'))
                 .attr('src', item)
+                .attr('alt', '')
                 .appendTo($makebutton(key));
         }else if (typeof item == 'string'){
             // a list of text -> treat as text picker
@@ -132,9 +135,9 @@ function pickerInsert(text,edid){
 function addBtnActionSignature($btn, props, edid) {
     if(typeof SIG != 'undefined' && SIG != ''){
         $btn.bind('click', bind(insertAtCarret,edid,SIG));
-        return true;
+        return edid;
     }
-    return false;
+    return '';
 }
 
 /**
diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js
index 042e3460852c2a8dc6986389d89659cac0c46669..2c0924eb77c548ecf8f9f8cdb8b5c282e95e4438 100644
--- a/lib/scripts/editor.js
+++ b/lib/scripts/editor.js
@@ -65,6 +65,7 @@ var dw_editor = {
         ], function (_, img) {
             jQuery(document.createElement('IMG'))
                 .attr('src', DOKU_BASE+'lib/images/' + img[0] + '.gif')
+                .attr('alt', '')
                 .click(img[1])
                 .appendTo($ctl);
         });
diff --git a/lib/scripts/helpers.js b/lib/scripts/helpers.js
index d6f36967de881c7b9898a1017789a605e6b646fa..632c4bff2c5ac0542d21f4e26ae6962e647023a8 100644
--- a/lib/scripts/helpers.js
+++ b/lib/scripts/helpers.js
@@ -2,25 +2,6 @@
  * Various helper functions
  */
 
-/**
- * Very simplistic Flash plugin check, probably works for Flash 8 and higher only
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function hasFlash(version){
-    var ver = 0;
-    try{
-        if(navigator.plugins != null && navigator.plugins.length > 0){
-           ver = navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0];
-        }else{
-           ver = (new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))
-                 .GetVariable("$version").split(' ')[1].split(',')[0];
-        }
-    }catch(e){ }
-
-    return ver >= version;
-}
-
 /**
  * A PHP-style substr_replace
  *
diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index 182d5fefe0edf472a94e7092c70216738e972075..8ca21ecabccfd26e2c88f6d3a4fe4e2aad123dac 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -921,23 +921,4 @@ var dw_mediamanager = {
     }
 };
 
-// moved from helpers.js temporarily here
-/**
- * Very simplistic Flash plugin check, probably works for Flash 8 and higher only
- *
- */
-function hasFlash(version){
-    var ver = 0, axo;
-    try{
-        if(navigator.plugins !== null && navigator.plugins.length > 0){
-           ver = navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0];
-        }else{
-           axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
-           ver = axo.GetVariable("$version").split(' ')[1].split(',')[0];
-        }
-    }catch(e){ }
-
-    return ver >= version;
-}
-
 jQuery(dw_mediamanager.init);
diff --git a/lib/scripts/page.js b/lib/scripts/page.js
index 4ab0bf9b5d35827f5af45999b04c05e15aad2e54..7b4958d8254f2706def95b368be7bb9fbc4074a7 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');
     },
 
     /**
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index 6d75215e0e17cf5f1d455428169e3ccf0efaaa9c..5fc4d835eebeb3c649a463772a65009e8cc767db 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -52,8 +52,13 @@ function initToolbar(tbid,edid,tb, allowblock){
         // type is a init function -> execute it
         actionFunc = 'addBtnAction'+val.type.charAt(0).toUpperCase()+val.type.substring(1);
         if( jQuery.isFunction(window[actionFunc]) ){
-            if(window[actionFunc]($btn, val, edid)){
+            var pickerid = window[actionFunc]($btn, val, edid);
+            if(pickerid !== ''){
                 $toolbar.append($btn);
+                $btn.attr('aria-controls', pickerid);
+                if (actionFunc === 'addBtnActionPicker') {
+                    $btn.attr('aria-haspopup', 'true');
+                }
             }
             return;
         }
@@ -190,16 +195,17 @@ function tb_autohead(btn, props, edid){
  */
 function addBtnActionPicker($btn, props, edid) {
     var pickerid = 'picker'+(pickercounter++);
-    createPicker(pickerid, props, edid);
+    var picker = createPicker(pickerid, props, edid);
+    jQuery(picker).attr('aria-hidden', 'true');
 
     $btn.click(
         function() {
             pickerToggle(pickerid,$btn);
-            return false;
+            return '';
         }
     );
 
-    return true;
+    return pickerid;
 }
 
 /**
@@ -215,22 +221,26 @@ function addBtnActionLinkwiz(btn, props, edid) {
     dw_linkwiz.init(jQuery('#'+edid));
     jQuery(btn).click(function(){
         dw_linkwiz.toggle();
-        return false;
+        return '';
     });
-    return true;
+    return 'link__wiz';
 }
 
 
 /**
- * Show/Hide a previosly created picker window
+ * Show/Hide a previously created picker window
  *
  * @author Andreas Gohr <andi@splitbrain.org>
  */
 function pickerToggle(pickerid,$btn){
     var $picker = jQuery('#' + pickerid),
         pos = $btn.offset();
-    $picker.toggleClass('a11y')
-           .offset({left: pos.left+3, top: pos.top+$btn[0].offsetHeight+3});
+    if ($picker.hasClass('a11y')) {
+        $picker.removeClass('a11y').attr('aria-hidden', 'false');
+    } else {
+        $picker.addClass('a11y').attr('aria-hidden', 'true');
+    }
+    $picker.offset({left: pos.left+3, top: pos.top+$btn[0].offsetHeight+3});
 }
 
 /**
@@ -252,4 +262,5 @@ function fixtxt(str){
 
 jQuery(function () {
     initToolbar('tool__bar','wiki__text',toolbar);
+    jQuery('#tool__bar').attr('role', 'toolbar');
 });
diff --git a/lib/scripts/tree.js b/lib/scripts/tree.js
index 96763053d87d04d52a87be74c3c748a8a915963a..c4e1da3f73bfdc3f6c41a5162f20588aed37824f 100644
--- a/lib/scripts/tree.js
+++ b/lib/scripts/tree.js
@@ -14,6 +14,12 @@ jQuery.fn.dw_tree = function(overrides) {
         init: function () {
             this.$obj.delegate(this.toggle_selector, 'click', this,
                                this.toggle);
+            jQuery('ul:first', this.$obj).attr('role', 'tree');
+            jQuery('ul', this.$obj).not(':first').attr('role', 'group');
+            jQuery('li', this.$obj).attr('role', 'treeitem');
+            jQuery('li.open > ul', this.$obj).attr('aria-expanded', 'true');
+            jQuery('li.closed > ul', this.$obj).attr('aria-expanded', 'false');
+            jQuery('li.closed', this.$obj).attr('aria-live', 'assertive');
         },
 
         /**
@@ -35,8 +41,14 @@ jQuery.fn.dw_tree = function(overrides) {
             $listitem = $clicky.closest('li');
             $sublist = $listitem.find('ul').first();
             opening = $listitem.hasClass('closed');
-            $listitem.toggleClass('open closed');
             dw_tree.toggle_display($clicky, opening);
+            if ($sublist.is(':visible')) {
+                $listitem.removeClass('open').addClass('closed');
+                $sublist.attr('aria-expanded', 'false');
+            } else {
+                $listitem.removeClass('closed').addClass('open');
+                $sublist.attr('aria-expanded', 'true');
+            }
 
             // if already open, close by hiding the sublist
             if (!opening) {
@@ -48,6 +60,8 @@ jQuery.fn.dw_tree = function(overrides) {
                 $sublist.hide();
                 if (typeof data !== 'undefined') {
                     $sublist.html(data);
+                    $sublist.parent().attr('aria-busy', 'false').removeAttr('aria-live');
+                    jQuery('li.closed', $sublist).attr('aria-live', 'assertive');
                 }
                 if ($listitem.hasClass('open')) {
                     // Only show if user didn’t close the list since starting
@@ -63,11 +77,11 @@ jQuery.fn.dw_tree = function(overrides) {
             }
 
             //prepare the new ul
-            $sublist = jQuery('<ul class="idx"/>');
+            $sublist = jQuery('<ul class="idx" role="group"/>');
             $listitem.append($sublist);
 
             timeout = window.setTimeout(
-                bind(show_sublist, '<li><img src="' + DOKU_BASE + 'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>'), dw_tree.throbber_delay);
+                bind(show_sublist, '<li aria-busy="true"><img src="' + DOKU_BASE + 'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>'), dw_tree.throbber_delay);
 
             dw_tree.load_data(function (data) {
                                   window.clearTimeout(timeout);
diff --git a/lib/scripts/tw-sack.js b/lib/scripts/tw-sack.js
index cc988f5bedbab94b744c55e4b7e87ba9abef723c..b0e570151b60bfd8412a5f8a395986b8648b38c0 100644
--- a/lib/scripts/tw-sack.js
+++ b/lib/scripts/tw-sack.js
@@ -2,6 +2,7 @@
 /* ©2005 Gregory Wild-Smith */
 /* www.twilightuniverse.com */
 /* Software licenced under a modified X11 licence, see documentation or authors website for more details */
+/* @deprecated */
 
 function sack(file){
   this.AjaxFailedAlert = "Your browser does not support the enhanced functionality of this website, and therefore you will have an experience that differs from the intended one.\n";