Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Missing link flag #13001

Merged
merged 16 commits into from
Oct 8, 2019
Merged
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
10 changes: 10 additions & 0 deletions lib/web_ui/lib/src/ui/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ class SemanticsFlag {
static const int _kIsMultilineIndex = 1 << 19;
static const int _kIsReadOnlyIndex = 1 << 20;
static const int _kIsFocusableIndex = 1 << 21;
static const int _kIsLinkIndex = 1 << 22;

const SemanticsFlag._(this.index);

Expand Down Expand Up @@ -341,6 +342,12 @@ class SemanticsFlag {
/// a button.
static const SemanticsFlag isButton = SemanticsFlag._(_kIsButtonIndex);

/// Whether the semantic node represents a link.
///
/// Platforms have special handling for links, for example, iOS's VoiceOver
/// provides an additional hint when the focused object is a link.
static const SemanticsFlag isLink = SemanticsFlag._(_kIsButtonIndex);

/// Whether the semantic node represents a text field.
///
/// Text fields are announced as such and allow text input via accessibility
Expand Down Expand Up @@ -522,6 +529,7 @@ class SemanticsFlag {
_kIsCheckedIndex: isChecked,
_kIsSelectedIndex: isSelected,
_kIsButtonIndex: isButton,
_kIsLinkIndex: isLink,
_kIsTextFieldIndex: isTextField,
_kIsFocusableIndex: isFocusable,
_kIsFocusedIndex: isFocused,
Expand Down Expand Up @@ -553,6 +561,8 @@ class SemanticsFlag {
return 'SemanticsFlag.isSelected';
case _kIsButtonIndex:
return 'SemanticsFlag.isButton';
case _kIsLinkIndex:
return 'SemanticsFlag.isLink';
case _kIsTextFieldIndex:
return 'SemanticsFlag.isTextField';
case _kIsFocusableIndex:
Expand Down