A11Y: improve expand/collapse labeling on embedded solution post (#381)

This commit is contained in:
Kris 2025-07-10 16:21:49 -04:00 committed by GitHub
parent e4b4a97d9e
commit 0f03ec45c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,14 +128,17 @@ export default class SolvedAcceptedAnswer extends Component {
<div class="quote-controls">
<button
aria-controls={{this.quoteId}}
aria-expanded={{this.expanded}}
aria-expanded={{if this.expanded "true" "false"}}
class="quote-toggle btn-flat"
type="button"
>
{{icon
(if this.expanded "chevron-up" "chevron-down")
title="post.expand_collapse"
aria-label={{if
this.expanded
(i18n "post.collapse")
(i18n "expand")
}}
title={{if this.expanded (i18n "post.collapse") (i18n "expand")}}
>
{{icon (if this.expanded "chevron-up" "chevron-down")}}
</button>
</div>
{{/if}}