From d9592ddcb0af6473f56649658a5c852faf7f349b Mon Sep 17 00:00:00 2001
From: Thomas Tanghus <thomas@tanghus.net>
Date: Fri, 4 May 2012 17:54:52 +0200
Subject: [PATCH] Tried to make settings/apps more keyboard/screenreader
 friendly.

---
 core/css/styles.css         | 1 +
 settings/js/apps.js         | 7 +++++++
 settings/templates/apps.php | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/core/css/styles.css b/core/css/styles.css
index e3d8403e75..c77df7d4cc 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -62,6 +62,7 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-
 #leftcontent li:hover, #leftcontent li:active, #leftcontent li.active, .leftcontent li:hover, .leftcontent li:active, .leftcontent li.active { background:#eee; }
 #leftcontent li.active, .leftcontent li.active { font-weight:bold; }
 #leftcontent li:hover, .leftcontent li:hover { color:#333; background:#ddd; }
+#leftcontent a { height: 100%; display: block; margin: 0; padding: 0 1em 0 0; float: left; }
 #rightcontent, .rightcontent { position:fixed; top: 6.4em; left: 32.5em; overflow: auto }
 
 
diff --git a/settings/js/apps.js b/settings/js/apps.js
index df5300911a..c15f0f3047 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -9,6 +9,12 @@ $(document).ready(function(){
 		var app=$.parseJSON($(this).children('span').text());
 		$(li).data('app',app);
 	});
+	$('#leftcontent li').keydown(function(event) {
+		if (event.which == 13 || event.which == 32) {
+			$(event.target).click()
+		}
+		return false;
+	});
 	$('#leftcontent li').click(function(){
 		var app=$(this).data('app');
 		$('#rightcontent p').show();
@@ -25,6 +31,7 @@ $(document).ready(function(){
 		$('#rightcontent input.enable').val((app.active)?t('settings','Disable'):t('settings','Enable'));
 		$('#rightcontent input.enable').data('appid',app.id);
 		$('#rightcontent input.enable').data('active',app.active);
+		return false;
 	});
 	$('#rightcontent input.enable').click(function(){
 		var app=$(this).data('appid');
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index d25ca1bc7f..7642ab7fb8 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -10,7 +10,7 @@
 <ul id="leftcontent">
 	<?php foreach($_['apps'] as $app):?>
 	<li <?php if($app['active']) echo 'class="active"'?> data-id="<?php echo $app['id'] ?>">
-		<?php  echo $app['name'] ?>
+		<a href="?appid=<?php echo $app['id'] ?>"><?php  echo $app['name'] ?></a>
 		<span class="hidden">
 			<?php OC_JSON::encodedPrint($app,false) ?>
 		</span>
-- 
GitLab