From ec741923f7653dcbff5a423f0b1130d2e7c9d323 Mon Sep 17 00:00:00 2001 From: userquin Date: Sat, 6 Apr 2024 00:26:22 +0200 Subject: [PATCH] feat(a11y): add access keys shortcuts --- components/main/MainContent.vue | 5 +++++ components/skip/SkipContent.ts | 14 ++++++++++++++ components/skip/SkipContentLink.vue | 5 +++++ constants/access-keys.ts | 6 ++++++ layouts/default.vue | 1 + locales/en.json | 3 ++- locales/es.json | 3 ++- pages/settings.vue | 2 +- pages/settings/about/index.vue | 2 +- pages/settings/interface/index.vue | 2 +- pages/settings/language/index.vue | 2 +- pages/settings/notifications/index.vue | 2 +- pages/settings/notifications/notifications.vue | 2 +- .../settings/notifications/push-notifications.vue | 2 +- pages/settings/preferences/index.vue | 2 +- pages/settings/profile/appearance.vue | 2 +- pages/settings/profile/featured-tags.vue | 2 +- pages/settings/profile/index.vue | 2 +- pages/settings/users/index.vue | 2 +- 19 files changed, 47 insertions(+), 14 deletions(-) create mode 100644 components/skip/SkipContent.ts create mode 100644 components/skip/SkipContentLink.vue create mode 100644 constants/access-keys.ts diff --git a/components/main/MainContent.vue b/components/main/MainContent.vue index 312b5e52..8a55a165 100644 --- a/components/main/MainContent.vue +++ b/components/main/MainContent.vue @@ -6,6 +6,8 @@ defineProps<{ back?: boolean /** Do not applying overflow hidden to let use floatable components in title */ noOverflowHidden?: boolean + /** Show the skip content link */ + skipContent?: string }>() const container = ref() @@ -26,6 +28,9 @@ const containerClass = computed(() => {