fix(ui): accessibility check targets the New task dialog; keep focus outlines on dock handles (#1963)

This commit is contained in:
sam committed 2026-11-14 04:09:20 +11:00
1 parent 3225396cf1
commit 104854da2a
3 files changed
+9 -6

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ module.exports = async ({ page, go, shot, fail, settled, tolerate }) => {
await go('/tasks');
await page.getByRole('button', { name: 'Jump to', exact: true }).click();
await page.getByRole('option', { name: 'New task', exact: true }).click();
const dialog = page.getByRole('dialog');
const dialog = page.getByRole('dialog', { name: 'New task' });
await dialog.waitFor();
await settled();
const bounds = await dialog.boundingBox();
+6 -3
View File
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue";
import { errors } from "@/copy/errors";
import { useRoute, useRouter } from "vue-router";
import { START_LOCATION, useRoute, useRouter } from "vue-router";
import AccountEntry from "@/accounts/AccountEntry.vue";
import { useAccountsStore } from "@/accounts/accounts";
@@ -48,10 +48,13 @@ watch(() => [route.path, accounts.instance], () => {
const scope = route.meta.org ? "Organisation" : route.meta.settings ? "Instance" : "";
document.title = [route.meta.label || errors.base.notFound.title, scope, "Archie", accounts.instance].filter(Boolean).join(" | ");
}, { immediate: true });
watch(() => route.path, async () => {
// A page load keeps focus at the top so the skip link is the first keyboard
// stop; later navigations move focus to the new page.
router.afterEach(async (to, from) => {
if (from === START_LOCATION || to.path === from.path) return;
await nextTick();
main.value?.focus({ preventScroll: true });
}, { flush: "post" });
});
onMounted(() => {void accounts.load();});
// A failed startup read retries on an interval, so a proxy or daemon that
+2 -2
View File
@@ -437,7 +437,7 @@ function onPinKey(event: KeyboardEvent): void {
:aria-valuemin="dir === 'n' || dir === 's' ? MIN_H : MIN_W"
:aria-valuemax="dir === 'n' || dir === 's' ? vh : vw"
:data-resize="dir"
:class="cn('absolute z-10 touch-none hover:bg-primary/30 focus-visible:bg-primary/50 focus-visible:outline-none', HANDLE_CLASS[dir])"
:class="cn('absolute z-10 touch-none hover:bg-primary/30 focus-visible:bg-primary/50', HANDLE_CLASS[dir])"
@keydown="onHandleKey(dir, $event)"
/>
</template>
@@ -451,7 +451,7 @@ function onPinKey(event: KeyboardEvent): void {
:aria-valuemin="MIN_W"
:aria-valuemax="pinMax"
data-resize="pin"
class="absolute inset-y-0 z-10 w-1.5 cursor-col-resize touch-none hover:bg-primary/30 focus-visible:bg-primary/50 focus-visible:outline-none"
class="absolute inset-y-0 z-10 w-1.5 cursor-col-resize touch-none hover:bg-primary/30 focus-visible:bg-primary/50"
:class="mode === 'left' ? '-right-0.5' : '-left-0.5'"
@keydown="onPinKey"
/>