Repository navigation
Description
Select your plan
Community - basic support
Confirmations
- I searched the existing feature requests and this is not a duplicate.
Framework or plugin?
Framework
Platform
Both
Use case
Native widgets such as Text and Button(title:) get their accessibility from the platform. Custom controls don't, and there is no way to describe them: DartNative 1.0.0 has no Semantics (nor MergeSemantics / ExcludeSemantics), and Icon has no semanticLabel.
error • The function 'Semantics' isn't defined • undefined_function
error • The named parameter 'semanticLabel' isn't defined • undefined_named_parameter
Our app has two common cases:
- A hold-to-delete button: a
GestureDetector(onLongPress:)around a red circle with a trashIcon. A screen-reader user needs to hear "Hold to delete, button" and to be able to trigger it. - Icon-only
IconButtons (export, attach, share) in toolbars and rows.
The repro puts both next to a Button(title: 'Save') and dumps the iOS accessibility tree (XCUIApplication.debugDescription from a UI test):
Other, {{16.0, 279.7}, {64.0, 64.0}} <- hold-to-delete (GestureDetector)
StaticText, {{33.0, 296.7}, {30.0, 30.0}}, label: ''
Other, {{104.0, 287.7}, {48.0, 48.0}} <- IconButton (export)
StaticText, {{116.0, 299.7}, {24.0, 24.0}}, label: ''
Button, {{176.0, 292.3}, {61.0, 38.3}}, label: 'Save' <- Button(title: 'Save')
The text button is a labelled Button; the two custom controls are unlabelled glyphs with no button trait, so the tree gives VoiceOver no name for them and no sign that they can be activated.
Workaround: none that we found for the label; we put a visible text label next to some icons.
The accessibility dump is in the repo at recording/a11y.txt.
Proposal
The Flutter API, mapped to the platform accessibility properties:
Semantics(
label: 'Hold to delete',
button: true,
onLongPressHint: 'Delete record',
child: GestureDetector(onLongPress: deleteRecord, child: const DeleteCircle()),
)
Icon(Icons.ios_share, semanticLabel: 'Export PDF')Semantics({label, hint, value, button, header, image, selected, enabled, excludeSemantics, onTap, onLongPress, onTapHint, onLongPressHint, child}), at leastlabel,hint,value,button,headerandexcludeSemantics.MergeSemantics/ExcludeSemantics.Icon.semanticLabelandImage.semanticLabel.
On iOS these map to isAccessibilityElement, accessibilityLabel / accessibilityHint / accessibilityValue, accessibilityTraits (.button, .header, .image, .selected) and accessibilityCustomActions; on Android to contentDescription, AccessibilityNodeInfo class name / role and AccessibilityActions (via ViewCompat / AccessibilityDelegateCompat).

Activity
gabrijm commentedon Oct 4, 2026
Thank you for reporting this! We’ll look into it very soon and include a fix in this week’s framework update.
gabrijm commentedon Oct 6, 2026
This is added and ships in this week's framework update.
Semantics(label,value,hint,button,header,image,selected,enabled,excludeSemantics,onTap,onLongPressand their hints),MergeSemantics,ExcludeSemantics,Icon.semanticLabelandImage.semanticLabel, on VoiceOver and TalkBack:Your hold-to-delete control now reads "Hold to delete, button", and "Delete record" is in VoiceOver's actions. An
IconButtonreads as a button named by itstooltipor its icon'ssemanticLabel. If you need more than the platform's accessibility offers, you can build your own on top of these, as in Flutter.