confirmationDialog: TalkBack's first focus is an "Unlabelled" tap-to-dismiss margin, and the buttons have no role
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 80/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- android, swift
- Domain
- accessibility, mobile
Research direction
Both edits land in Layout/Presentation.swift: the tap-to-dismiss Box inside ConfirmationDialogPresentation, and the Box in ConfirmationDialogButton. Read those two composables first and note the modifier order — clearAndSetSemantics { } must precede clickable to strip the margin from the accessibility tree, and clickable needs role: Role.Button. Done means the first TalkBack focus on the open dialog is the title, buttons are announced as "Button", and tapping the margin still dismisses; verify on an emulator with TalkBack enabled.
Written by the indexing model from the issue text.
Description
Environment
- skip-ui 1.63.0 (the code below is unchanged in 1.66.4), Fuse app, native mode, Material3, TalkBack on an Android 15 emulator
What happens
When a confirmationDialog opens, TalkBack's first focus lands on an element it reads as "Unlabelled". The dialog buttons are then announced without "Button".
.confirmationDialog("Remove Camille?", isPresented: $confirm, titleVisibility: .visible) {
Button("Remove", role: .destructive) { remove() }
Button("Cancel", role: .cancel) { }
}
Why
Layout/Presentation.swift, ConfirmationDialogPresentation, adds a 128 dp tap-to-dismiss margin above the sheet:
Box(modifier: Modifier.fillMaxWidth().height(128.dp).clickable(interactionSource: interactionSource, indication: nil, onClick: { isPresented.set(false) }))
A clickable node with no text: TalkBack focuses it first and reads "Unlabelled". ConfirmationDialogButton uses clickable(onClick:) without a role.
Suggested fix
- Box(modifier: Modifier.fillMaxWidth().height(128.dp).clickable(interactionSource: interactionSource, indication: nil, onClick: { isPresented.set(false) }))
+ Box(modifier: Modifier.fillMaxWidth().height(128.dp).clearAndSetSemantics { }.clickable(interactionSource: interactionSource, indication: nil, onClick: { isPresented.set(false) }))
...
- Box(modifier: Modifier.fillMaxWidth().requiredHeightIn(min: 60.dp).clickable(onClick: action), contentAlignment: androidx.compose.ui.Alignment.Center) {
+ Box(modifier: Modifier.fillMaxWidth().requiredHeightIn(min: 60.dp).clickable(role: Role.Button, onClick: action), contentAlignment: androidx.compose.ui.Alignment.Center) {
clearAndSetSemantics placed BEFORE clickable removes the margin from the accessibility tree; touch still dismisses, and the sheet keeps its own "Dismiss" action for TalkBack users. The first focus then goes to the title.
- Dominant language
- Swift
- Stars
- 334
- Forks
- 95
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from skiptools/skip-ui
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 4 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 4 days
All issues in skiptools/skip-ui
Similar issues
-
AndroidAssetManager(env:peer:) in AssetURLProtocol.swift doesn't compile for Android on the Swift nightlyPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
erkamyaman/unslop-anything#579 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
erkamyaman/rust-anything#1311 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug priority:low status:queued
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day