Add aria-label on link preview toggle button
This commit is contained in:
parent
a33108bd49
commit
7df26dc373
@ -2,6 +2,7 @@
|
|||||||
<button
|
<button
|
||||||
v-if="link.type !== 'loading'"
|
v-if="link.type !== 'loading'"
|
||||||
:class="['toggle-button', 'toggle-preview', { opened: link.shown }]"
|
:class="['toggle-button', 'toggle-preview', { opened: link.shown }]"
|
||||||
|
:aria-label="ariaLabel"
|
||||||
@click="onClick"
|
@click="onClick"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
@ -12,6 +13,11 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
link: Object,
|
link: Object,
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
ariaLabel() {
|
||||||
|
return this.link.shown ? "Collapse preview" : "Expand preview";
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onClick() {
|
onClick() {
|
||||||
this.link.shown = !this.link.shown;
|
this.link.shown = !this.link.shown;
|
||||||
|
Loading…
Reference in New Issue
Block a user