Add hidden username input to TelegramPanel for accessibility and password manager compatibility
ci / build-backend (push) Successful in 2m39s
ci / build-frontend (push) Successful in 59s
ci / tests (push) Successful in 2m44s
ci / sonar (push) Successful in 8m9s

Introduced a hidden input field for the bot's username in the TelegramPanel component. This change ensures compatibility with password managers and improves accessibility for screen readers by providing a meaningful value for the bot's credentials. The input is read-only and hidden from the user interface, maintaining a clean design while enhancing functionality.
This commit is contained in:
Leonid Pershin
2026-07-31 08:10:14 +03:00
parent 54cc4862b2
commit 99821d3c76
@@ -110,6 +110,20 @@ export function TelegramPanel() {
save.mutate()
}}
>
{/* Скрытое имя к паролям: браузер требует его в любой форме с секретами — иначе менеджер
паролей не понимает, к какой учётной записи их отнести, а скринридер читает поля без
подписи. Значение осмысленное: секреты здесь принадлежат боту, а не человеку. */}
<input
type="text"
name="username"
autoComplete="username"
value={settings?.botUsername ?? 'telegram-bot'}
readOnly
hidden
aria-hidden="true"
tabIndex={-1}
/>
<label className="flex items-center gap-2">
<input
type="checkbox"