mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[EC-1029][EC-1030][EC-1031] focus on dialogs in admin console (#4634)
* [EC-1031] focus on dialogs in vault * [EC-1031] remove extra permissionMode * [EC-1030] add focus to group dialog * [EC-1031] undo extra changes * Update apps/web/src/vault/app/vault/vault-items.component.html Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> --------- Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
@fadeIn
|
||||
>
|
||||
<div class="tw-flex tw-flex-col tw-items-center tw-gap-2 tw-px-4 tw-pt-4 tw-text-center">
|
||||
<ng-content *ngIf="hasIcon; else elseBlock" select="[bit-dialog-icon]"></ng-content>
|
||||
<ng-template *ngIf="hasIcon; else elseBlock">
|
||||
<ng-content select="[bit-dialog-icon]"></ng-content>
|
||||
</ng-template>
|
||||
<ng-template #elseBlock>
|
||||
<i class="bwi bwi-exclamation-triangle tw-text-3xl tw-text-warning" aria-hidden="true"></i>
|
||||
</ng-template>
|
||||
|
||||
@@ -82,7 +82,7 @@ export class MenuTriggerForDirective implements OnDestroy {
|
||||
this.overlayRef.attach(templatePortal);
|
||||
|
||||
this.closedEventsSub = this.getClosedEvents().subscribe((event: KeyboardEvent | undefined) => {
|
||||
if (event?.key === "Tab") {
|
||||
if (["Tab", "Escape"].includes(event?.key)) {
|
||||
// Required to ensure tab order resumes correctly
|
||||
this.elementRef.nativeElement.focus();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
[attr.role]="ariaRole"
|
||||
[attr.aria-label]="ariaLabel"
|
||||
cdkTrapFocus
|
||||
[cdkTrapFocusAutoCapture]="true"
|
||||
>
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user