Add alt text for react and extra-buttons popup

This commit is contained in:
tusooa 2023-11-12 14:51:39 -05:00
parent c3c233c6fe
commit 0026b35f66
No known key found for this signature in database
GPG Key ID: 42AEC43D48433C51
4 changed files with 22 additions and 3 deletions

View File

@ -3,7 +3,7 @@
ref="popover" ref="popover"
trigger="click" trigger="click"
popover-class="emoji-picker popover-default" popover-class="emoji-picker popover-default"
:trigger-attrs="{ 'aria-hidden': true }" :trigger-attrs="{ 'aria-hidden': true, tabindex: -1 }"
@show="onPopoverShown" @show="onPopoverShown"
@close="onPopoverClosed" @close="onPopoverClosed"
> >

View File

@ -2,6 +2,7 @@
<Popover <Popover
class="ExtraButtons" class="ExtraButtons"
trigger="click" trigger="click"
:triggerAttrs="{ title: $t('status.more_actions') }"
placement="top" placement="top"
:offset="{ y: 5 }" :offset="{ y: 5 }"
:bound-to="{ x: 'container' }" :bound-to="{ x: 'container' }"
@ -10,10 +11,14 @@
@close="onClose" @close="onClose"
> >
<template #content="{close}"> <template #content="{close}">
<div class="dropdown-menu"> <div
class="dropdown-menu"
role="menu"
>
<button <button
v-if="canMute && !status.thread_muted" v-if="canMute && !status.thread_muted"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="muteConversation" @click.prevent="muteConversation"
> >
<FAIcon <FAIcon
@ -24,6 +29,7 @@
<button <button
v-if="canMute && status.thread_muted" v-if="canMute && status.thread_muted"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="unmuteConversation" @click.prevent="unmuteConversation"
> >
<FAIcon <FAIcon
@ -34,6 +40,7 @@
<button <button
v-if="!status.pinned && canPin" v-if="!status.pinned && canPin"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="pinStatus" @click.prevent="pinStatus"
@click="close" @click="close"
> >
@ -45,6 +52,7 @@
<button <button
v-if="status.pinned && canPin" v-if="status.pinned && canPin"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="unpinStatus" @click.prevent="unpinStatus"
@click="close" @click="close"
> >
@ -57,6 +65,7 @@
<button <button
v-if="!status.bookmarked" v-if="!status.bookmarked"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="bookmarkStatus" @click.prevent="bookmarkStatus"
@click="close" @click="close"
> >
@ -68,6 +77,7 @@
<button <button
v-if="status.bookmarked" v-if="status.bookmarked"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="unbookmarkStatus" @click.prevent="unbookmarkStatus"
@click="close" @click="close"
> >
@ -80,6 +90,7 @@
<button <button
v-if="ownStatus && editingAvailable" v-if="ownStatus && editingAvailable"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="editStatus" @click.prevent="editStatus"
@click="close" @click="close"
> >
@ -91,6 +102,7 @@
<button <button
v-if="isEdited && editingAvailable" v-if="isEdited && editingAvailable"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="showStatusHistory" @click.prevent="showStatusHistory"
@click="close" @click="close"
> >
@ -102,6 +114,7 @@
<button <button
v-if="canDelete" v-if="canDelete"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="deleteStatus" @click.prevent="deleteStatus"
@click="close" @click="close"
> >
@ -112,6 +125,7 @@
</button> </button>
<button <button
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="copyLink" @click.prevent="copyLink"
@click="close" @click="close"
> >
@ -123,6 +137,7 @@
<a <a
v-if="!status.is_local" v-if="!status.is_local"
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
title="Source" title="Source"
:href="status.external_url" :href="status.external_url"
target="_blank" target="_blank"
@ -134,6 +149,7 @@
</a> </a>
<button <button
class="button-default dropdown-item dropdown-item-icon" class="button-default dropdown-item dropdown-item-icon"
role="menuitem"
@click.prevent="reportStatus" @click.prevent="reportStatus"
@click="close" @click="close"
> >

View File

@ -11,6 +11,8 @@
/> />
<span <span
class="button-unstyled popover-trigger" class="button-unstyled popover-trigger"
role="button"
:tabindex="0"
:title="$t('tool_tip.add_reaction')" :title="$t('tool_tip.add_reaction')"
@click.stop.prevent="show" @click.stop.prevent="show"
> >

View File

@ -1045,7 +1045,8 @@
"reaction_count_label": "{num} person reacted | {num} people reacted", "reaction_count_label": "{num} person reacted | {num} people reacted",
"hide_quote": "Hide the quoted status", "hide_quote": "Hide the quoted status",
"display_quote": "Display the quoted status", "display_quote": "Display the quoted status",
"invisible_quote": "Quoted status unavailable: {link}" "invisible_quote": "Quoted status unavailable: {link}",
"more_actions": "More actions on this status"
}, },
"user_card": { "user_card": {
"approve": "Approve", "approve": "Approve",