Fix accessibility: message composer label and 'Seen by' button (#6390, #6393)

- MarkdownTextInput: set contentDescription on MarkdownEditText so TalkBack
  announces a persistent label even when the field has content (fixes #6390)
- TimelineItemReadReceiptView: remove hideFromAccessibility() so the 'Seen by'
  button is exposed to TalkBack; use semantics (not clearAndSetSemantics) to
  preserve click action, and add Role.Button (fixes #6393)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benoit Marty
2026-07-01 17:49:32 +02:00
parent 58b3830187
commit 79f1423a30
2 changed files with 9 additions and 11 deletions
@@ -93,6 +93,7 @@ fun MarkdownTextInput(
setText(text)
setHint(placeholder)
setHintTextColor(ColorStateList.valueOf(placeholderColor.toArgb()))
contentDescription = placeholder
inputType = InputType.TYPE_CLASS_TEXT or
InputType.TYPE_TEXT_FLAG_CAP_SENTENCES or
InputType.TYPE_TEXT_FLAG_MULTI_LINE or
@@ -129,6 +130,7 @@ fun MarkdownTextInput(
}
},
update = { editText ->
editText.contentDescription = placeholder
editText.applyStyleInCompose(richTextEditorStyle)
val text = state.text.value()
mentionSpanUpdater.updateMentionSpans(text)