Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: accessibility issues of dropdown menu. #471

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 31 additions & 8 deletions lib/screens/item/widgets/main_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -484,18 +484,41 @@ class _ParentItemSection extends StatelessWidget {
],
const Spacer(),
if (!state.isOfflineReading)
CustomDropdownMenu<FetchMode>(
menuChildren: FetchMode.values,
onSelected: context.read<CommentsCubit>().updateFetchMode,
selected: state.fetchMode,
Semantics(
container: true,
label: 'Fetch Mode',
hint: 'Select fetch mode for comments',
child: GestureDetector(
onTap: () {},
child: Container(
padding: const EdgeInsets.all(8),
child: CustomDropdownMenu<FetchMode>(
menuChildren: FetchMode.values,
onSelected:
context.read<CommentsCubit>().updateFetchMode,
selected: state.fetchMode,
),
),
),
),
const SizedBox(
width: Dimens.pt6,
),
CustomDropdownMenu<CommentsOrder>(
menuChildren: CommentsOrder.values,
onSelected: context.read<CommentsCubit>().updateOrder,
selected: state.order,
Semantics(
container: true,
label: 'Comments Order',
hint: 'Select order to sort comments',
child: GestureDetector(
onTap: () {},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the usage of this GestureDetector with empty callback?

child: Container(
padding: const EdgeInsets.all(8.0),
yinuoyang01 marked this conversation as resolved.
Show resolved Hide resolved
child: CustomDropdownMenu<CommentsOrder>(
menuChildren: CommentsOrder.values,
onSelected: context.read<CommentsCubit>().updateOrder,
selected: state.order,
),
),
),
),
const SizedBox(
width: Dimens.pt4,
Expand Down