Skip to content

🐛 Fix semantics #691

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions example/lib/widgets/method_list_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ class _MethodListViewState extends State<MethodListView> {
width: 48,
height: 48,
child: Center(
child: Text(
model.icon,
style: const TextStyle(fontSize: 28.0),
child: ExcludeSemantics(
child: Text(
model.icon,
style: const TextStyle(fontSize: 28.0),
),
),
),
),
Expand Down
28 changes: 12 additions & 16 deletions lib/src/delegates/asset_picker_builder_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -696,14 +696,7 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
Navigator.maybeOf(context)?.maybePop();
},
tooltip: MaterialLocalizations.of(context).closeButtonTooltip,
icon: Icon(
Icons.close,
semanticLabel: switch (Theme.of(context).platform) {
TargetPlatform.android =>
MaterialLocalizations.of(context).closeButtonTooltip,
_ => null,
},
),
icon: const Icon(Icons.close),
),
);
}
Expand Down Expand Up @@ -771,14 +764,17 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
),
);

final Widget accessLimitedButton = GestureDetector(
onTap: () {
permissionOverlayDisplay.value = false;
},
child: ScaleText(
textDelegate.accessLimitedAssets,
style: TextStyle(color: interactiveTextColor(context)),
semanticsLabel: semanticsTextDelegate.accessLimitedAssets,
final Widget accessLimitedButton = Semantics(
label: semanticsTextDelegate.accessLimitedAssets,
button: true,
child: GestureDetector(
onTap: () {
permissionOverlayDisplay.value = false;
},
child: ScaleText(
textDelegate.accessLimitedAssets,
style: TextStyle(color: interactiveTextColor(context)),
),
),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,14 +733,7 @@ class DefaultAssetPickerViewerBuilderDelegate
Navigator.maybeOf(context)?.maybePop();
},
tooltip: MaterialLocalizations.of(context).backButtonTooltip,
icon: Icon(
Icons.arrow_back_ios_new,
semanticLabel: switch (Theme.of(context).platform) {
TargetPlatform.android =>
MaterialLocalizations.of(context).backButtonTooltip,
_ => null,
},
),
icon: const Icon(Icons.arrow_back_ios_new),
),
),
centerTitle: true,
Expand Down