Add hidden username input to TelegramPanel for accessibility and password manager compatibility
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:
@@ -110,6 +110,20 @@ export function TelegramPanel() {
|
|||||||
save.mutate()
|
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">
|
<label className="flex items-center gap-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
Reference in New Issue
Block a user