Barrierfree Links in new window

XHTML Strict denys the use of target=„_blank“ in <a> elements. With the following code in the head-part of your html-files you can use <a href=“#“ rel=„external“>Link</a> in a barrierfree way.

<!-- Javascript -->
<script type="text/javascript">
<!--
function setExternalLinks() {
    if (!document.getElementsByTagName) {
               return null;
    }
    var anchors = document.getElementsByTagName("a");
        for (var i=0;i < anchors.length;i++) {
                   var anchor = anchors[i];
                   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
                      anchor.setAttribute("target", "blank");
                   }
        }
    }
window.onload = setExternalLinks;
-->
</script>