tooltips: Clean up aria-label for visiblity tooltips.

Using different punctuation for the aria-label from the tooltip is
silly. Additionally, we don't need to repeat the channel name in
aria-label; it essentially will never be seen and the message list
copy of getting the channel name was buggy.
This commit is contained in:
Tim Abbott
2024-07-25 07:54:12 -07:00
parent a1c8e3549a
commit f61f138b75
5 changed files with 12 additions and 15 deletions

View File

@@ -62,16 +62,16 @@
<span class="change_visibility_policy hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}">
{{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}
<i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic.'}}"
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic' }}"></i>
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic.' }}"></i>
{{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}
<i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic.'}}"
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic' }}"></i>
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic.' }}"></i>
{{else if (eq visibility_policy all_visibility_policies.MUTED)}}
<i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic.'}}"
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic' }}"></i>
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic.' }}"></i>
{{else}}
<i class="zulip-icon zulip-icon-inherit recipient_bar_icon"
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'Notifications are based on your configuration for #{stream_name}' }}"></i>
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'Notifications are based on your configuration for this channel.' }}"></i>
{{/if}}
</span>
{{/if}}