A11Y: moves anchor rendering out of conditional to prevent losing focus (#17887)

This commit is contained in:
Joffrey JAFFEUX 2022-08-12 21:20:18 +02:00 committed by GitHub
parent 5afdf24292
commit 494cc2c69d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 7 deletions

View File

@ -1,11 +1,9 @@
{{#if this.item.truncated}}
{{#if this.expanded}}
<a href class="collapse-item" onclick={{action "toggleItem"}} title={{i18n "post.expand_collapse"}}>
<a href class={{if this.expanded "collapse-item" "expand-item"}} onclick={{action "toggleItem"}} title={{i18n "post.expand_collapse"}}>
{{#if this.expanded}}
{{d-icon "chevron-up"}}
</a>
{{else}}
<a href class="expand-item" onclick={{action "toggleItem"}} title={{i18n "post.expand_collapse"}}>
{{else}}
{{d-icon "chevron-down"}}
</a>
{{/if}}
{{/if}}
</a>
{{/if}}