a11y audit: roles, live regions, content descriptions, and template principles#91
Merged
Merged
Conversation
…rinciples
- Add contentDescription to SpeedDial SmallFABs (HomeScreen) so TalkBack
reads the action name rather than nothing when an icon-only FAB is focused.
- Add semantics Role.Button to all raw .clickable{} elements that had no
role: Manage screen list items, history period cards, stats year picker and
chart-type selector, archive section header, alarm permission banner, and
SettingsNavItem.
- Add semantics Role.RadioButton to category icon picker cells, themed colour
swatches, and extended-palette swatches in the colour picker.
- Set stateDescription on expand/collapse controls (StatsWarningBanner,
archive header) so TalkBack announces the current expanded/collapsed state.
- Add liveRegion = LiveRegionMode.Assertive to PIN error text on LockScreen
and PinSetupScreen so incorrect-PIN feedback is announced immediately.
- Add liveRegion = LiveRegionMode.Polite plus contentDescription to PinDots
on both PIN screens so digit count is announced as each key is pressed.
- Add contentDescription = "Delete" to the ⌫ TextButton on both PIN keypads
so TalkBack reads the action rather than the raw Unicode symbol.
- Set RadioButton(onClick = null) in ExportOptionsDialog and move the role to
the wrapping Row, eliminating the duplicate-focus pattern.
- Expand template_requirements.md Accessibility section with five principles:
content descriptions, keyboard/switch roles, dynamic text scaling, focus
order, and live-region announcements.
- Add three a11y lessons to LESSONS.md covering .clickable role semantics,
liveRegion for status changes, and icon-only FAB labelling.
https://claude.ai/code/session_01AeVcEqKNsCwEG6iSF4MYt4
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.
$(cat <<'EOF'
Summary
Full accessibility audit of the GoFlo codebase covering five dimensions, with fixes applied across 12 files plus the project template.
contentDescription = labelon the FAB container itself, so TalkBack announces the action (e.g. "Mood", "Log Period") rather than silence when an icon-only FAB is focused..clickable {}elements that had no semantic role now declare.semantics { role = Role.Button }(navigation list items, history cards, stats year picker, chart-type selector, archive section header, alarm permission banner, settings nav items) orRole.RadioButton(category icon picker, themed colour swatches, extended-palette swatches, export format rows). The Export dialog also setsRadioButton(onClick = null)on the inner RadioButton to prevent the double-focus pattern.liveRegion = LiveRegionMode.Assertiveso TalkBack immediately interrupts to announce "Incorrect PIN". The PinDots indicator usesliveRegion = LiveRegionMode.Politewith a digit-count contentDescription so each keypress is announced. The backspace key getscontentDescription = "Delete"on both PIN screens. Expand/collapse controls gainstateDescriptionto announce the resulting state.What changed and why
HomeScreen.ktModifier.semantics { contentDescription = label }on SpeedDial SmallFABManageScreen.ktRole.Buttonon both ListItem clickablesStatsWarningBanner.ktRole.Button+stateDescriptionon expand/collapse RowHistoryScreen.ktRole.Buttonon period card clickableStatsScreen.ktRole.Buttonon year picker and chart-type selectorManageCategoriesScreen.ktRole.Button/stateDescriptionon archive header;Role.RadioButton+selected+contentDescriptionon icon and colour pickers;Role.Button+contentDescriptionon custom-colour slotSettingsScreen.ktRole.ButtononSettingsNavItemRemindersScreen.ktRole.Buttonon alarm permission ListItemLockScreen.ktcontentDescription = "Delete"on ⌫ buttonPinSetupScreen.ktExportOptionsDialog.ktRole.RadioButtonon format rows;RadioButton(onClick = null)template_requirements.mdLESSONS.mdTest plan
https://claude.ai/code/session_01AeVcEqKNsCwEG6iSF4MYt4
EOF
)
Generated by Claude Code