Accessibility: Adding a label attribute for <uui-button> in news dashboard (#20780)

Added 'label attribute to the uui-button in the umb-news.card.element + Removing the redundant text for uui-button since label attribute is now present
This commit is contained in:
Mathias Helsengren
2025-11-11 06:33:31 +01:00
committed by GitHub
parent 9fa382e84d
commit d8198d2f5c

View File

@@ -36,9 +36,12 @@ export class UmbNewsCardElement extends UmbLitElement {
${this.item.body ? html`<div class="card-text">${unsafeHTML(this.item.body)}</div>` : nothing}
${!isLastRow && this.item.url
? html`<div class="card-actions">
<uui-button look="outline" href=${this.item.url} target="_blank" rel="noopener">
${this.item.buttonText || 'Open'}
</uui-button>
<uui-button
look="outline"
href=${this.item.url}
target="_blank"
rel="noopener"
label=${this.item.buttonText || 'Open'}></uui-button>
</div>`
: nothing}
</div>