Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 5cb765f1 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #7012 from gitstart/K9-OSS-20

Fix : Screen reader won't say unread for unread message #accessibility 
parents 6ff3d408 8a3ea4df
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -409,10 +409,14 @@ class MessageListAdapter internal constructor(

            holder.subject.typeface = Typeface.create(holder.subject.typeface, maybeBoldTypeface)
            holder.subject.setTextColor(textColor)
            if (appearance.senderAboveSubject) {
                holder.subject.text = displayName

            val firstLineText = if (appearance.senderAboveSubject) displayName else subject
            holder.subject.text = firstLineText

            holder.subject.contentDescription = if (isRead) {
                null
            } else {
                holder.subject.text = subject
                res.getString(R.string.message_list_content_description_unread_prefix, firstLineText)
            }

            holder.date.typeface = Typeface.create(holder.date.typeface, maybeBoldTypeface)
+3 −0
Original line number Diff line number Diff line
@@ -1341,4 +1341,7 @@ You can keep this message and use it as a backup for your secret key. If you wan

    <!-- Might be displayed in a notification when deleting an account (in the background) -->
    <string name="background_work_notification_remove_account">Removing account…</string>

    <!-- For unread messages the first line of a message list item is modified by this to improve the experience for people with screen readers. -->
    <string name="message_list_content_description_unread_prefix">unread, %s</string>
</resources>