summaryrefslogtreecommitdiff
path: root/BKUOnline/src/main/webapp
diff options
context:
space:
mode:
authortzefferer <tzefferer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-10-16 09:55:47 +0000
committertzefferer <tzefferer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-10-16 09:55:47 +0000
commit27e674646e9d8cb6ffb69598858c2316f4e8e73b (patch)
treed4536c4aa105a3450f5443938935fe470ba3b98c /BKUOnline/src/main/webapp
parent3e9a60407d354c793ce07f0c8d4ea0b2d8b56d45 (diff)
downloadmocca-27e674646e9d8cb6ffb69598858c2316f4e8e73b.tar.gz
mocca-27e674646e9d8cb6ffb69598858c2316f4e8e73b.tar.bz2
mocca-27e674646e9d8cb6ffb69598858c2316f4e8e73b.zip
Keyboard accessibility for Online-BKU
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@531 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline/src/main/webapp')
-rw-r--r--BKUOnline/src/main/webapp/PINManagement.jsp35
-rw-r--r--BKUOnline/src/main/webapp/applet.jsp41
2 files changed, 71 insertions, 5 deletions
diff --git a/BKUOnline/src/main/webapp/PINManagement.jsp b/BKUOnline/src/main/webapp/PINManagement.jsp
index 454174e7..3555f99e 100644
--- a/BKUOnline/src/main/webapp/PINManagement.jsp
+++ b/BKUOnline/src/main/webapp/PINManagement.jsp
@@ -49,8 +49,12 @@
}
String backgroundImg = request.getParameter("appletBackground");
%>
- <body id="appletpage" style="width:<%=width%>">
+ <body id="appletpage" style="width:<%=width%>" onFocus="focusToApplet()">
<script>
+
+ // avoid selection of applet before it is completely loaded
+ var allowSelectionByJS = false;
+
if (!deployJava.versionCheck('1.6.0_04+')) {
document
.write('<b>Diese Anwendung benötigt die Java Platform Version 1.6.0_04 oder höher.</b>' + '<input type="submit" value="Java Platform 1.6.0_02 installieren" onclick="deployJava.installLatestJRE();">');
@@ -60,7 +64,9 @@
code : 'at.gv.egiz.bku.online.applet.PINManagementApplet.class',
archive : 'BKUAppletExt.jar, commons-logging.jar, iaik_jce_me4se.jar',
width : <%=width%>,
- height :<%=height%>
+ height :<%=height%>,
+ name : 'moccaapplet',
+ id : 'moccaapplet'
};
var parameters = {
GuiStyle : '<%=guiStyle%>',
@@ -76,4 +82,29 @@
}
</script>
</body>
+
+ <script>
+
+ function focusToApplet() {
+
+ //alert('try to set focus to applet');
+ if (document != null && document.moccaapplet != null && allowSelectionByJS) {
+
+ //alert('set focus to applet.');
+ document.moccaapplet.getFocusFromBrowser();
+ return true;
+ }
+ allowSelectionByJS = true;
+ }
+
+ function focusToBrowser() {
+
+ // put focus to window
+ // focus can be assigned to an arbitrary focusable field on the embedding website as well
+ self.focus();
+
+ }
+
+ </script>
+
</html>
diff --git a/BKUOnline/src/main/webapp/applet.jsp b/BKUOnline/src/main/webapp/applet.jsp
index 09792c9a..31f3362b 100644
--- a/BKUOnline/src/main/webapp/applet.jsp
+++ b/BKUOnline/src/main/webapp/applet.jsp
@@ -71,8 +71,12 @@
}
%>
- <body id="appletpage" style="width:<%=width%>px">
+ <body id="appletpage" style="width:<%=width%>px" onFocus="focusToApplet()">
<script>
+
+ // avoid selection of applet before it is completely loaded
+ var allowSelectionByJS = false;
+
if (!deployJava.versionCheck('1.6.0_04+')) {
document
.write('<p>Diese Anwendung benötigt Version 6 Update 4 oder höher der <a href="" onclick="deployJava.installLatestJRE();">Java&trade; Laufzeitumgebung</a>.</p>');
@@ -86,9 +90,10 @@
code : '<%=appletClass%>',
archive : '<%=appletArchive +".jar, commons-logging.jar, iaik_jce_me4se.jar"%>',
width : <%=width%>,
- height :<%=height%>
+ height :<%=height%>,
+ name : 'moccaapplet',
+ id : 'moccaapplet'
};
-
var parameters = {
GuiStyle : '<%=guiStyle%>',
Locale : '<%=locale%>',
@@ -102,7 +107,37 @@
};
var version = '1.6.0_04';
deployJava.runApplet(attributes, parameters, version);
+
+
}
+
+
+
</script>
+
</body>
+
+ <script>
+
+ function focusToApplet() {
+
+ //alert('try to set focus to applet');
+ if (document != null && document.moccaapplet != null && allowSelectionByJS) {
+
+ //alert('set focus to applet.');
+ document.moccaapplet.getFocusFromBrowser();
+ return true;
+ }
+ allowSelectionByJS = true;
+ }
+
+ function focusToBrowser() {
+
+ // put focus to window
+ // focus can be assigned to any focusable field on the embedding website
+ self.focus();
+
+ }
+
+ </script>
</html>