Label touch targets below 44dp accessibility minimum #71
Labels
No labels
auth
bug
composer
correctness
database
durability
enhancement
feeds
interactions
notifications
performance
reliability
safety
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starsetbyte/peregrine#71
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
SafetyLabelPillandSocialLabelRun(inLabelBadge.kt) render inline in the post metadata row with only 2dp vertical padding onlabelSmalltext — effective touch target ~24dp, well below the 44dp WCAG/Android accessibility minimum.The problem
Compose
clickablemodifier uses the layout box as the hit area. To get a 44dp touch target, the component must BE 44dp tall, which stretches the dense metadata row (normally ~20dp). The design spec (Section 10.2) says "Interactive targets are at least 44dp, preferably 48dp" but also "where density allows" — a feed metadata row isn't the right place for full-size targets.What was tried
heightIn(min = 44.dp)+clickableon wrapper Box/Row: works but visibly stretches the metadata row (confirmed on emulator). Reverted in the geometry pass.Possible approaches
Modifier.pointerInputwithdetectTapGestureson a larger hit area than the layout bounds (Compose doesn't natively support touch delegates, but a custom gesture detector might work).Layoutwith out-of-bounds touch handling — measure compact, but intercept touches in a larger region.Files
app/src/main/java/com/peregrine/android/ui/common/moderation/LabelBadge.kt—SafetyLabelPill,SocialLabelRunSection 7.7(label pill system),Section 10.2(touch targets)Related
docs/plans/2026-07-11-consolidated-roadmap-and-review.md)fix/post-card-density-baseline(preserves compact density)