-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide password in setup-config.php #3725
Conversation
Hi @bgoewert! 👋 Thank you for your contribution to WordPress! 💖 It looks like this is your first pull request to No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making. More information about how GitHub pull requests can be used to contribute to WordPress can be found in this blog post. Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook. If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook. The Developer Hub also documents the various coding standards that are followed:
Thank you, |
@@ -0,0 +1,33 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file could be named password-toggle.js
for reusability on other screens in Core. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, missed that. Agreed. Renaming now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update inline comment file name.
Need to use global search next time when renaming things.
@mukeshpanchal27's suggested change has been committed. Waiting to be reviewed again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating a script to try making this more consistent. If we keep the icon-only button, reusing the script for the Login page could help reduce resources there (ticket:57157).
However, while the icon-only button is consistent with the Login page, it is not consistent with other visibility toggle buttons in .form-table
elements at larger screen sizes (on Profile and Installation pages). Andrea acknowledged that icon-only controls are an accessibility anti-pattern before committing r46256 as a "self-contained" improvement that ideally would have a different design later.
Also, the icon-only button on setup-config
has the overlap with some password managers, as seen on the Login page (ticket:48222).
-
In Edge, the LastPass icon appears behind the button on
setup-config
, so the toggle button is still clickable. -
In Chrome (Windows), the Norton Password Manager icon covers the button at a higher
z-index
:
I marked some changes to this PR in case we continue in this direction.
src/wp-admin/css/forms.css
Outdated
@@ -550,7 +550,53 @@ fieldset label, | |||
} | |||
|
|||
.wp-pwd { | |||
margin-top: 1em; | |||
display: inline-block; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In an attempt to fix the overlap issue I commented on, as well as the incorrect lang support I added here, I noticed that the profile page was hiding the pw toggle text on narrower screens. So I added <span class="text"><?php _e( 'Show' ); ?></span>
to test. Unfortunately, this creates white space that is not taken up by the pw field or pw manager icons and the button is still focusable. It may be better to hide the button entirely and re-add the 10px padding that is added to input fields here for narrower screens.
Thoughts @sabernhardt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was fixed in PR #3827 by separating the button from the input. Technically this is unresolved in this PR so I will leave it as such.
…d-toggle` elements
…ton applies to if there are multiple fields
Thank you @sabernhardt for the thorough review. I tried to address all your comments. Another change I added towards a standardized
I noticed the profile page has an icon and text. If it helps with accessibility I can change the icon to text, or add an icon and text, to maintain consistency with the other toggles. Would it be preferable to still keep the button as "part of" the password input? Or do we go back to separating the button from the input? Do we then at some point also change the login page to follow suit?
Separating the button from the input would address this. |
Closed in r56008 |
Trac ticket: https://core.trac.wordpress.org/ticket/3534
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.