From 9bb75e12307cae30bd64825c83e1f7488d47a088 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 23 Jan 2017 14:05:47 -0800 Subject: [PATCH] Add accessibility labels to databases and tables checkboxes --- adminer/db.inc.php | 5 +++-- adminer/include/connect.inc.php | 5 +++-- changes.txt | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 42cfd8fc..e2c1aa3e 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -80,8 +80,9 @@ if ($adminer->homepage()) { $tables = 0; foreach ($tables_list as $name => $type) { $view = ($type !== null && !preg_match('~table~i', $type)); - echo '' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');"); - echo '' . (support("table") || support("indexes") ? '' . h($name) . '' : h($name)); + $id = h("Table-" . $name); + echo '' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');", "", $id); + echo '' . (support("table") || support("indexes") ? "" . h($name) . '' : h($name)); if ($view) { echo '' . (preg_match('~materialized~i', $type) ? lang('Materialized View') : lang('View')) . ''; echo '?'; diff --git a/adminer/include/connect.inc.php b/adminer/include/connect.inc.php index c46e3e8a..b008faf7 100644 --- a/adminer/include/connect.inc.php +++ b/adminer/include/connect.inc.php @@ -43,8 +43,9 @@ function connect_error() { foreach ($databases as $db => $tables) { $root = h(ME) . "db=" . urlencode($db); - echo "" . (support("database") ? "" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])) : ""); - echo "" . h($db) . ""; + $id = h("Db-" . $db); + echo "" . (support("database") ? "" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : ""); + echo "" . h($db) . ""; $collation = nbsp(db_collation($db, $collations)); echo "" . (support("database") ? "$collation" : $collation); echo "" . ($_GET["dbsize"] ? $tables : "?") . ""; diff --git a/changes.txt b/changes.txt index bf19bf30..5dbb1c2d 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,5 @@ Adminer 4.2.6-dev: -Add accessibility labels to Create Table fields +Add accessibility labels Make maxlength in edit fields a soft limit Add Cache-Control: immutable to static files