Repository navigation
Conversation
Contributor
|
Thank you for the contribution! Sorry, it will take me some time to test the PR and review them. I will try to get to them as soon as I can, so please bear with me. |
- The faded-out half of the leading slot (multi-select checkbox outside multi-select mode, complete/start/approve buttons inside it) is now aria-hidden and out of the tab order. The checkbox gets a name. - Label chips are only focusable when they filter (onChipClick), and then act as named buttons; Space no longer scrolls the page. - Complete and approve buttons take taps across 44px on touch screens (PRODUCT.md touch target) without changing their 32/24px look; the slot grows by the 4px the margin gives up, so the title stays put. - Button and slot animations have a prefers-reduced-motion alternative. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CompactChoreCard now imports visibleLabels from utils/Labels (donetick#414), so the module stub map needs an entry for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hoge6b01
force-pushed
the
fix/task-card-a11y
branch
from
December 1, 2026 19:17
3043937 to
c83b260
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three issues in
CompactChoreCard(Home, compact task list, project board) where the card breaks requirements fromPRODUCT.md: 44px touch targets, WCAG 2.1 AA, and aprefers-reduced-motionalternative for every animation. The card looks the same as before. Nothing visual changes, only how it behaves for keyboard, screen reader and touch users.1. Hidden controls are no longer reachable
The leading slot stacks the complete button and the multi-select checkbox, and hides one of them with
opacity: 0+pointer-events: none. The hidden one stayed in the tab order and the accessibility tree. On Home, every card had an invisible, unnamed checkbox as a tab stop (axelabel, critical). In multi-select mode the same happened the other way round with the complete button.aria-hidden, and its controls gettabIndex={-1}.chores.selectTaskNamed).2. Label chips are only tab stops when they do something
Every label chip sat in a
<div role="none" tabIndex={0}>, so on Home (noonChipClick) each chip was an empty tab stop. Now:onChipClickthe wrapper is plain text.onChipClick(task list, board) the wrapper is a named button: "Filter by label {{name}}" (chores.filterByLabel). Space no longer scrolls the page.3. 44px touch targets and reduced motion
The complete button is 32px and the approve button 24px (
size="sm"with fixed sizes, so the theme's 44px rule doesn't apply).::afternow extends their hit area to 44px. They keep their visual size.pointer: coarsethe slot grows from 40 to 44px and its margin shrinks by the same 4px, so the task name stays exactly where it was.prefers-reduced-motionalternative that nulls transition and transform, following the convention inThemeContext.The two new keys are translated into all base locales.
Testing
tests/compact-chore-card.test.mjsrenders the real card with stubs (same approach asproject-task-row.test.mjs). It covers the hidden checkbox and complete button in both modes, label chips with and withoutonChipClick(including keyboard), and the hit area and reduced-motion styles. All 5 tests fail ondevelop.node --test tests/*.test.mjsshows no new failures.npx eslint/npx prettier -con the changed files,npm run lint:i18nandscripts/i18n/i18n-pr-safety.mjspass.vite buildsucceeds.labelviolations on Home go from 5 to 0, with no new violations.prefers-reduced-motion: reduce, button and slot have no transition.Not included, found while testing: the swipe actions behind each card (
SwipeActionTray) are also in the tab order while hidden. That's a separate component and a separate PR.Claude (Anthropic's AI assistant) helped with the analysis, implementation, tests and translations; I reviewed all changes.
🤖 Generated with Claude Code