未验证 提交 414ad386 编写于 作者: K Kate Lovett 提交者: GitHub

Missing link flag (#13001)

上级 9f650edd
......@@ -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);
......@@ -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
......@@ -522,6 +529,7 @@ class SemanticsFlag {
_kIsCheckedIndex: isChecked,
_kIsSelectedIndex: isSelected,
_kIsButtonIndex: isButton,
_kIsLinkIndex: isLink,
_kIsTextFieldIndex: isTextField,
_kIsFocusableIndex: isFocusable,
_kIsFocusedIndex: isFocused,
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册