mirror of
https://github.com/block/buzz.git
synced 2026-10-29 05:21:31 +00:00
fix(mobile): scope exact-label semantics to mention text
Signed-off-by: Logan Johnson <loganj@squareup.com>
This commit is contained in:
@@ -868,14 +868,11 @@ class _MentionMd extends InlineMd {
|
||||
RegExp(r'\(([0-9a-f]{64})\)'),
|
||||
(m) => '(${m[1]!.substring(0, 8)}…${m[1]!.substring(60)})',
|
||||
);
|
||||
final pill = Semantics(
|
||||
label: fullLabel,
|
||||
excludeSemantics: true,
|
||||
child: _MentionPill(
|
||||
label: visibleLabel,
|
||||
isAgent: isAgent,
|
||||
textStyle: config.style,
|
||||
),
|
||||
final pill = _MentionPill(
|
||||
label: visibleLabel,
|
||||
semanticsLabel: fullLabel,
|
||||
isAgent: isAgent,
|
||||
textStyle: config.style,
|
||||
);
|
||||
|
||||
return WidgetSpan(
|
||||
@@ -890,11 +887,13 @@ class _MentionMd extends InlineMd {
|
||||
|
||||
class _MentionPill extends StatelessWidget {
|
||||
final String label;
|
||||
final String? semanticsLabel;
|
||||
final bool isAgent;
|
||||
final TextStyle? textStyle;
|
||||
|
||||
const _MentionPill({
|
||||
required this.label,
|
||||
this.semanticsLabel,
|
||||
required this.isAgent,
|
||||
this.textStyle,
|
||||
});
|
||||
@@ -941,7 +940,7 @@ class _MentionPill extends StatelessWidget {
|
||||
offset: const Offset(0, -Grid.quarter),
|
||||
child: Text('@', style: style),
|
||||
),
|
||||
Text(label, style: style),
|
||||
Text(label, style: style, semanticsLabel: semanticsLabel),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user