diff --git a/adminer/include/html.inc.php b/adminer/include/html.inc.php
index 9193b5d5..91ce6cd8 100644
--- a/adminer/include/html.inc.php
+++ b/adminer/include/html.inc.php
@@ -90,9 +90,17 @@ function optionlist($options, $selected = null, bool $use_keys = false): string
* @param string[] $options
*/
function html_select(string $name, array $options, ?string $value = "", string $onchange = "", string $labelled_by = ""): string {
+ static $label = 0;
+ $label_option = "";
+ if (!$labelled_by && substr($options[""], 0, 1) == "(") {
+ $label++;
+ $labelled_by = "label-$label";
+ $label_option = "