Fix danger button accessibility
This commit is contained in:
parent
499d660723
commit
80e92f76f1
|
@ -225,9 +225,9 @@
|
|||
<div class="content-col">
|
||||
|
||||
<div class="danger-zone">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<div class="mb-1 fw-bold" i18n>Send a link to reset the password by email to the user</div>
|
||||
<button class="peertube-button" (click)="resetPassword()" i18n>Ask for new password</button>
|
||||
<button class="peertube-button danger-button" (click)="resetPassword()" i18n>Ask for new password</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
@ -237,7 +237,7 @@
|
|||
|
||||
<div *ngIf="user.twoFactorEnabled" class="form-group">
|
||||
<div class="mb-1 fw-bold" i18n>This user has two factor authentication enabled</div>
|
||||
<button class="peertube-button" (click)="disableTwoFactorAuth()" i18n>Disable two factor authentication</button>
|
||||
<button class="peertube-button danger-button" (click)="disableTwoFactorAuth()" i18n>Disable two factor authentication</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -24,11 +24,6 @@ my-select-custom-value {
|
|||
@include responsive-width($form-base-input-width);
|
||||
}
|
||||
|
||||
.danger-zone button {
|
||||
@include danger-button;
|
||||
@include disable-outline;
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
{{ formErrors.password }}
|
||||
</div>
|
||||
|
||||
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
|
||||
<input class="peertube-button danger-button mt-2" type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
|
||||
</form>
|
||||
|
|
|
@ -5,11 +5,3 @@ input[type=text],
|
|||
input[type=password] {
|
||||
@include peertube-input-text(340px);
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
margin-top: 10px;
|
||||
|
||||
@include peertube-button;
|
||||
@include danger-button;
|
||||
@include disable-outline;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<div class="delete-me">
|
||||
<p i18n>Once you delete your account, there is no going back. You will be asked to confirm this action.</p>
|
||||
|
||||
<button (click)="deleteMe()" i18n>Delete your account</button>
|
||||
<button class="peertube-button danger-button" (click)="deleteMe()" i18n>Delete your account</button>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
@use '_variables' as *;
|
||||
@use '_mixins' as *;
|
||||
|
||||
.delete-me {
|
||||
button {
|
||||
@include peertube-button;
|
||||
@include danger-button;
|
||||
@include disable-outline;
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@ import { AuthService, ConfirmService, Notifier, RedirectService, User, UserServi
|
|||
@Component({
|
||||
selector: 'my-account-danger-zone',
|
||||
templateUrl: './my-account-danger-zone.component.html',
|
||||
styleUrls: [ './my-account-danger-zone.component.scss' ],
|
||||
standalone: true
|
||||
})
|
||||
export class MyAccountDangerZoneComponent {
|
||||
|
|
|
@ -111,8 +111,9 @@ input[readonly] {
|
|||
|
||||
input,
|
||||
textarea {
|
||||
outline: none;
|
||||
color: pvar(--inputForegroundColor);
|
||||
|
||||
@include disable-outline;
|
||||
}
|
||||
|
||||
button {
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
@include tertiary-button;
|
||||
}
|
||||
|
||||
.danger-button {
|
||||
@include danger-button;
|
||||
}
|
||||
|
||||
.peertube-radio-container {
|
||||
@include peertube-radio-container;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
margin-bottom: 10px;
|
||||
|
||||
&.pt-title-danger {
|
||||
color: color.adjust($color: #c54130, $lightness: 10%);
|
||||
color: pvar(--red);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,8 +191,8 @@
|
|||
}
|
||||
|
||||
@mixin grey-button {
|
||||
background-color: pvar(--greyBackgroundColor);
|
||||
color: pvar(--greyForegroundColor);
|
||||
background-color: pvar(--greyBackgroundColor);
|
||||
|
||||
@include button-focus($grey-button-outline-color);
|
||||
|
||||
|
@ -214,27 +214,24 @@
|
|||
}
|
||||
|
||||
@mixin danger-button {
|
||||
$color: color.adjust($color: #c54130, $lightness: 10%);
|
||||
$text: #fff6f5;
|
||||
background-color: pvar(--red);
|
||||
color: pvar(--white);
|
||||
|
||||
background-color: $color;
|
||||
color: $text;
|
||||
|
||||
@include button-focus(color.scale($color, $alpha: -95%));
|
||||
@include button-focus(pvar(--red));
|
||||
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus,
|
||||
&[disabled] {
|
||||
background-color: color.adjust($color: $color, $lightness: 10%);
|
||||
&:focus:not(:focus-visible) {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
cursor: default;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
my-global-icon {
|
||||
@include apply-svg-color($text);
|
||||
@include apply-svg-color(pvar(--white));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ $support-button-heart: #e83e8c;
|
|||
$bg-color: #fff;
|
||||
$fg-color: #212529;
|
||||
|
||||
$red: #EE0700;
|
||||
$green: #278904;
|
||||
$red: #dc3545;
|
||||
$green: #198754;
|
||||
$white: #fff;
|
||||
|
||||
$expanded-horizontal-margins: 150px;
|
||||
|
|
Loading…
Reference in New Issue