Add KaiOS keyboard controls

main
Pk11 2 years ago
parent ca8ffcdb66
commit 3c13a9afe6

@ -209,7 +209,7 @@
// 停留所フォームをプリント
echo '<form method="get" action="' . $_SERVER['PHP_SELF'] . '">';
echo '<h2><label for="stop">停留所の番号</label></h2>';
echo '<input type="number" min="0" id="stop" name="stop" placeholder="12345" required>';
echo '<input type="number" tabindex="0" min="0" id="stop" name="stop" placeholder="12345" required>';
echo '<input type="submit" value="検索">';
echo '</form>';
@ -315,7 +315,7 @@
}
echo '<li class="d-flex">';
echo '<button type="submit" formmethod="get" name="stop" value="' . $row['stop'] . '" class="flex-fill"' . $accesskey . '>' . $row['stop'] . ' ' . $row['description'] . '</button>';
echo '<button type="submit" tabindex="0" formmethod="get" name="stop" value="' . $row['stop'] . '" class="flex-fill"' . $accesskey . '>' . $row['stop'] . ' ' . $row['description'] . '</button>';
echo '<button type="submit" formmethod="post" name="fav-up" value="' . $row['fav_id'] . '" title="' . $row['stop'] . 'の優先を上げる" aria-label="' . $row['stop'] . 'の優先を上げる"></button>';
echo '<button type="submit" formmethod="post" name="fav-down" value="' . $row['fav_id'] . '" title="' . $row['stop'] . 'の優先を下げる" aria-label="' . $row['stop'] . 'の優先を下げる"></button>';
echo '<button type="submit" formmethod="post" name="fav-remove" value="' . $row['fav_id'] . '" title="' . $row['stop'] . 'を削除" aria-label="' . $row['stop'] . 'を削除"class="btn danger">×</button>';
@ -336,7 +336,7 @@
echo '<ul class="unstyled-list">';
while($row = pg_fetch_array($res)) {
echo '<li class="mb-1 d-flex">';
echo '<button type="submit" formmethod="get" name="stop" value="' . $row['stop'] . '" class="btn btn-sm btn-secondary flex-fill me-1 text-start">' . $row['stop'] . '</button>';
echo '<button type="submit" tabindex="0" formmethod="get" name="stop" value="' . $row['stop'] . '" class="btn btn-sm btn-secondary flex-fill me-1 text-start">' . $row['stop'] . '</button>';
echo '<button type="submit" formmethod="post" name="history-remove" value="' . $row['history_id'] . '" title="' . $row['stop'] . 'を削除" aria-label="' . $row['stop'] . 'を削除" class="btn danger">×</button>';
echo '</li>';
}
@ -349,6 +349,9 @@
}
pg_close($dbc);
if(strstr($_SERVER['HTTP_USER_AGENT'], "KAIOS"))
echo '<script src="//xn--rck9c.xn--tckwe/assets/js/kaios.js"></script>';
?>
</main>
</body>

@ -2,6 +2,7 @@
h1, h2, h3 { margin-bottom: 0.5rem; }
h2 { border-bottom: 1px solid gray; margin-bottom: 0.5rem; }
hr { border: none; border-top: 1px solid gray; }
:focus { color: blue; }
.alert { margin-left: 0; padding-left: 1rem; border-left: 3px solid black; }
.alert.success { border-color: lime; }

Loading…
Cancel
Save