diff --git a/frontend/src/components/CommunityFeedPanel.vue b/frontend/src/components/CommunityFeedPanel.vue index cdb4d7f..e941e8c 100644 --- a/frontend/src/components/CommunityFeedPanel.vue +++ b/frontend/src/components/CommunityFeedPanel.vue @@ -111,13 +111,21 @@ const filterIds = filters.map((f) => f.id) function onFilterKeydown(e: KeyboardEvent) { const current = filterIds.indexOf(activeFilter.value) + let next = current if (e.key === 'ArrowRight') { e.preventDefault() - setFilter(filterIds[(current + 1) % filterIds.length]!) + next = (current + 1) % filterIds.length } else if (e.key === 'ArrowLeft') { e.preventDefault() - setFilter(filterIds[(current - 1 + filterIds.length) % filterIds.length]!) + next = (current - 1 + filterIds.length) % filterIds.length + } else { + return } + setFilter(filterIds[next]!) + // Move DOM focus to the newly active tab per ARIA tablist pattern + const bar = (e.currentTarget as HTMLElement).closest('[role="tablist"]') + const buttons = bar?.querySelectorAll('[role="tab"]') + buttons?.[next]?.focus() } async function setFilter(filterId: string) { @@ -247,5 +255,10 @@ onMounted(async () => { animation: none; opacity: 0.7; } + + .toast-fade-enter-active, + .toast-fade-leave-active { + transition: none; + } } diff --git a/frontend/src/components/CommunityPostCard.vue b/frontend/src/components/CommunityPostCard.vue index afa223c..64c83b5 100644 --- a/frontend/src/components/CommunityPostCard.vue +++ b/frontend/src/components/CommunityPostCard.vue @@ -169,4 +169,10 @@ const fullDate = computed(() => { width: 100%; } } + +@media (prefers-reduced-motion: reduce) { + .community-post-card { + transition: none; + } +}