Conflicting behaviour on user edit form

Created on 8 June 2023, about 1 year ago
Updated 15 August 2023, 11 months ago

Problem/Motivation

If you enable this module on the user edit form (user_form) there is conflicting behaviour in how the toggle works on the password fields shown on this form.

There are two locations on this form where you are prompted to enter a password. First is where you enter your current password if you wish to change your email address or password. Second is where you enter a new password.

If you toggle the show/hide button alongside one of the password fields, the button changes and the behaviour of the field changes accordingly. The button alongside the second password field will also change. However, the behaviour of the second field does not change.

So, if you change the status of the first field to show the password, the password will be shown as you type it and the button will toggle to “hide”.

The button alongside the second password field will also change to “hide”. However, if you type in this field the password is not shown.

If you click on the “hide” button alongside the second password field, the button will still show as “hide” but the field itself will now work as expected, in that the password is shown.

Note that I am a screen reader user, so I cannot comment on whether the icon itself changes. The above is what my screen reader reports as the state of each button.

View Password: 6.0.3
Drupal: 9.5.9
PHP: 8.1.19
Theme: Olivero

Steps to reproduce

1. Ensure that this module is enabled for the user edit form.
2. Navigate to the edit page for your account (eg xxx/user/1/edit).
3. Type some characters in to the first password field.
4. Change the behaviour of this field so that the password is shown.
5. Check the state of the button alongside the second password field. You should find that like the first field it has changed to “hide”. This would suggest that characters will be shown as you type in this field.
6. Type some characters in to the second password field. You should find that they are hidden.
7. Click on the “hide” button alongside the second password field. You should find that it still shows the state as “hide”.
8. Type some characters in to the second password field. You should find that they are shown.

In short, toggling the button alongside either of the password fields will change the state of the button for both fields, but only the behaviour of the field that the used button is alongside.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

6.0

Component

User interface

Created by

🇬🇧United Kingdom Janner

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024