Skip to content

Commit cb44371

Browse files
committed
a11y: Make avatar in webview voice-readable
Adds an `alt` prop to the `img` tag showing the avatar inside we WebView message list. Previously a voice-over assistent was reading the item with some random numeric number making it very unusable. Now it reads "John Doe graphic" where "John Doe" is the name of the person. This is consistent with how all other apps treat this UI element.
1 parent 1f9ad56 commit cb44371

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webview/html/messageAsHtml.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const fullMessageAsHtml = ({
114114
}: FullMessageProps) => template`
115115
$!${messageDiv(id, 'message-full', flags)}
116116
<div class="avatar">
117-
<img src="${avatarUrl}" class="avatar-img" data-email="${fromEmail}">
117+
<img src="${avatarUrl}" alt="${fromName}" class="avatar-img" data-email="${fromEmail}">
118118
</div>
119119
<div class="content">
120120
$!${messageSubheader({ fromName, timestamp, twentyFourHourTime })}

0 commit comments

Comments
 (0)