mirror of
https://github.com/thelounge/thelounge
synced 2025-02-17 05:38:25 +00:00
Merge pull request #3116 from thelounge/xpaw/preview-label
Add aria-label on link preview toggle button
This commit is contained in:
commit
b06eda8471
1 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
<button
|
||||
v-if="link.type !== 'loading'"
|
||||
:class="['toggle-button', 'toggle-preview', { opened: link.shown }]"
|
||||
:aria-label="ariaLabel"
|
||||
@click="onClick"
|
||||
/>
|
||||
</template>
|
||||
|
@ -12,6 +13,11 @@ export default {
|
|||
props: {
|
||||
link: Object,
|
||||
},
|
||||
computed: {
|
||||
ariaLabel() {
|
||||
return this.link.shown ? "Collapse preview" : "Expand preview";
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
this.link.shown = !this.link.shown;
|
||||
|
|
Loading…
Add table
Reference in a new issue