mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Improve login form tabbing (#36736)
**Related issue:** Resolves #36735 Fixed the order of tabbing on the log in page while maintaining update styling:  - [x] Changes file added for user-visible changes in `changes/` - [x] QA'd all new/changed functionality manually
This commit is contained in:
parent
fd62c4f58e
commit
2fd9a3f004
3 changed files with 29 additions and 24 deletions
1
changes/36735-improved-login-form-tabbability
Normal file
1
changes/36735-improved-login-form-tabbability
Normal file
|
|
@ -0,0 +1 @@
|
|||
- Fixed the tab order of elements in the login form
|
||||
|
|
@ -175,24 +175,24 @@ const LoginForm = ({
|
|||
value={formData.password}
|
||||
onChange={onInputChange("password")}
|
||||
/>
|
||||
<div className={`${baseClass}__forgot-link`}>
|
||||
<CustomLink
|
||||
className={`${baseClass}__forgot-link`}
|
||||
url={paths.FORGOT_PASSWORD}
|
||||
text="Forgot password?"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{/* Actions displayed using CSS column-reverse to preserve tab order */}
|
||||
<div className={`${baseClass}__login-actions`}>
|
||||
<Button
|
||||
className={`${baseClass}__login-btn`}
|
||||
isLoading={isSubmitting}
|
||||
type="submit"
|
||||
>
|
||||
Log in
|
||||
</Button>
|
||||
{ssoEnabled && renderSingleSignOnButton()}
|
||||
<div className={`${baseClass}__actions`}>
|
||||
<div className={`${baseClass}__login-actions`}>
|
||||
<Button
|
||||
className={`${baseClass}__login-btn`}
|
||||
isLoading={isSubmitting}
|
||||
type="submit"
|
||||
>
|
||||
Log in
|
||||
</Button>
|
||||
{ssoEnabled && renderSingleSignOnButton()}
|
||||
</div>
|
||||
<CustomLink
|
||||
className={`${baseClass}__forgot-link`}
|
||||
url={paths.FORGOT_PASSWORD}
|
||||
text="Forgot password?"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
&__login-actions,
|
||||
&__actions,
|
||||
&__form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -26,20 +26,24 @@
|
|||
|
||||
// Login button styles
|
||||
// Login and SSO button widths will always be equal
|
||||
// Min of 208px with login-button widening if SSO button is wider
|
||||
&__login-actions {
|
||||
max-width: min-content;
|
||||
&__actions {
|
||||
align-items: center;
|
||||
align-self: center;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
&__login-btn {
|
||||
min-width: 100%;
|
||||
&__login-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $gap-form;
|
||||
width: px-to-rem(228);
|
||||
}
|
||||
|
||||
&__forgot-link {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
&__sso-btn.button {
|
||||
min-width: 208px; // Must override form's .button specificity
|
||||
width: max-content;
|
||||
border: 1px solid $core-fleet-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue