Skip to content

Commit f7dd846

Browse files
committed
bug #486 Changed placeholder to real label (ThomasLandauer)
This PR was merged into the 1.0-dev branch. Discussion ---------- Changed placeholder to real label Although common, placing the label into the placeholder is bad practice and reduces usability and accessibility. If people wanna do it this way, they still can; but it shouldn't be suggested :-) If you merge it, I'll update the docs at https://symfony.com/doc/current/security/form_login_setup.html#generating-the-login-form too. Commits ------- fd5a6d5 Changed placeholder to real label
2 parents b0ae4ad + fd5a6d5 commit f7dd846

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Resources/skeleton/authenticator/login_form.tpl.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
<?php endif; ?>
1818

1919
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
20-
<label for="input<?= ucfirst($username_field); ?>" class="sr-only"><?= $username_label; ?></label>
21-
<input type="<?= $username_is_email ? 'email' : 'text'; ?>" value="{{ last_username }}" name="<?= $username_field; ?>" id="input<?= ucfirst($username_field); ?>" class="form-control" placeholder="<?= $username_label; ?>" required autofocus>
22-
<label for="inputPassword" class="sr-only">Password</label>
23-
<input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required>
20+
<label for="input<?= ucfirst($username_field); ?>"><?= $username_label; ?></label>
21+
<input type="<?= $username_is_email ? 'email' : 'text'; ?>" value="{{ last_username }}" name="<?= $username_field; ?>" id="input<?= ucfirst($username_field); ?>" class="form-control" required autofocus>
22+
<label for="inputPassword">Password</label>
23+
<input type="password" name="password" id="inputPassword" class="form-control" required>
2424

2525
<input type="hidden" name="_csrf_token"
2626
value="{{ csrf_token('authenticate') }}"

0 commit comments

Comments
 (0)