1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

Add accessibility labels to Create Table fields

This commit is contained in:
Jakub Vrana
2016-09-19 15:27:34 +02:00
parent f0a5fb56a5
commit 682e86d236
3 changed files with 19 additions and 16 deletions

View File

@@ -113,10 +113,12 @@ function nl_br($string) {
* @param string
* @param string
* @return string
* @return string
*/
function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "") {
function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "", $labelled_by = "") {
$return = "<input type='checkbox' name='$name' value='" . h($value) . "'"
. ($checked ? " checked" : "")
. ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
. ($onclick ? ' onclick="' . h($onclick) . '"' : '')
. ">"
;