From d1c1d75388b35a7ea5c6a5c57e25ab6c47f1b721 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 29 Apr 2023 19:14:36 -0700 Subject: [PATCH] Revert "keyboard accessibility (#9725)" This reverts commit c1d5922acbe7060c0ea779ccf314e9f0e6b91bb3. --- package.json | 2 - packages/client/src/components/MkButton.vue | 3 +- packages/client/src/components/MkCwButton.vue | 18 +- .../src/components/MkDriveFileThumbnail.vue | 7 +- .../client/src/components/MkEmojiPicker.vue | 278 +++++++------ .../client/src/components/MkLaunchPad.vue | 2 +- .../client/src/components/MkMediaImage.vue | 4 - .../client/src/components/MkMenu.child.vue | 21 +- packages/client/src/components/MkMenu.vue | 382 +++++++++--------- packages/client/src/components/MkModal.vue | 86 ++-- .../src/components/MkModalPageWindow.vue | 1 - .../client/src/components/MkModalWindow.vue | 95 +++-- packages/client/src/components/MkNote.vue | 8 +- .../client/src/components/MkNotePreview.vue | 2 +- packages/client/src/components/MkNoteSub.vue | 4 +- .../client/src/components/MkPopupMenu.vue | 2 - .../src/components/MkPostFormAttaches.vue | 1 + .../src/components/MkSubNoteContent.vue | 27 +- .../client/src/components/MkSuperMenu.vue | 5 +- .../src/components/MkUserSelectDialog.vue | 2 - .../client/src/components/MkUsersTooltip.vue | 2 +- packages/client/src/components/MkWidgets.vue | 2 +- .../client/src/components/form/folder.vue | 4 +- packages/client/src/components/form/radio.vue | 3 - .../client/src/components/form/switch.vue | 3 - .../src/components/global/MkPageHeader.vue | 2 - .../src/components/global/RouterView.vue | 3 - packages/client/src/directives/focus.ts | 3 - packages/client/src/directives/index.ts | 2 - packages/client/src/directives/tooltip.ts | 33 +- packages/client/src/pages/admin/_header_.vue | 6 +- .../src/pages/admin/overview.moderators.vue | 2 +- packages/client/src/pages/follow-requests.vue | 1 - .../client/src/pages/settings/accounts.vue | 8 +- packages/client/src/style.scss | 4 + .../src/ui/_common_/navbar-for-mobile.vue | 1 - packages/client/src/ui/_common_/navbar.vue | 21 +- packages/client/src/ui/classic.header.vue | 1 - packages/client/src/ui/classic.sidebar.vue | 4 +- packages/client/src/ui/classic.vue | 2 - pnpm-lock.yaml | 41 +- 41 files changed, 495 insertions(+), 603 deletions(-) delete mode 100644 packages/client/src/directives/focus.ts diff --git a/package.json b/package.json index 51556dea54..80942ff540 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,6 @@ "@bull-board/ui": "^4.10.2", "@napi-rs/cli": "^2.15.0", "@tensorflow/tfjs": "^3.21.0", - "focus-trap": "^7.2.0", - "focus-trap-vue": "^4.0.1", "js-yaml": "4.1.0", "seedrandom": "^3.0.5" }, diff --git a/packages/client/src/components/MkButton.vue b/packages/client/src/components/MkButton.vue index feac281d9e..5f1a5bdb7e 100644 --- a/packages/client/src/components/MkButton.vue +++ b/packages/client/src/components/MkButton.vue @@ -195,7 +195,8 @@ function onMousedown(evt: MouseEvent): void { } &:focus-visible { - outline: auto; + outline: solid 2px var(--focus); + outline-offset: 2px; } &.inline { diff --git a/packages/client/src/components/MkCwButton.vue b/packages/client/src/components/MkCwButton.vue index 1f6340510b..659cb1fbb6 100644 --- a/packages/client/src/components/MkCwButton.vue +++ b/packages/client/src/components/MkCwButton.vue @@ -1,6 +1,5 @@