generated from ttipo/project-base
fix(flutter): 화면 읽기 프로그램으로 누를 수 없던 버튼 6종 수정
Semantics(excludeSemantics: true) 로 감싼 버튼은 안쪽 InkWell 의 누르기 동작까지 지워져 TalkBack·VoiceOver 로 누를 수 없었다(하단 탭 · 언어 · 홈 검색창 · 카테고리 · 기준 위치 · 반려견 칩). Semantics 에도 같은 onTap 을 준다. 기기 접근성 트리에서 누를 수 있음으로 바뀐 것을 확인했고, 누르기 동작이 빠지면 위젯 테스트가 실패한다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -443,4 +443,36 @@ void main() {
|
||||
expect(find.text('대구근대골목'), findsOneWidget);
|
||||
expect(find.text('마실커피 동성로점'), findsNothing);
|
||||
});
|
||||
|
||||
// 2026-11-04 회귀 점검: excludeSemantics 가 누르기 동작까지 지워 TalkBack 으로 누를 수 없었다
|
||||
testWidgets('홈·검색의 버튼은 화면 읽기 프로그램으로도 누를 수 있다', (tester) async {
|
||||
final semantics = tester.ensureSemantics();
|
||||
await _pumpApp(
|
||||
tester,
|
||||
prefs: {'onboarding_done': true},
|
||||
places: _FakePlaceRepository(places: [_storeCafe]),
|
||||
);
|
||||
|
||||
for (final label in <Pattern>[
|
||||
'홈',
|
||||
'관광지',
|
||||
'장소 이름으로 검색',
|
||||
RegExp('^언어 변경'),
|
||||
RegExp('^기준 위치 변경'),
|
||||
]) {
|
||||
expect(
|
||||
tester.getSemantics(find.bySemanticsLabel(label).first),
|
||||
isSemantics(isButton: true, hasTapAction: true),
|
||||
reason: '$label',
|
||||
);
|
||||
}
|
||||
|
||||
await tester.tap(find.text('관광지'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
tester.getSemantics(find.bySemanticsLabel('반려견 동반')),
|
||||
isSemantics(isButton: true, hasTapAction: true),
|
||||
);
|
||||
semantics.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user