My client has the same CTA (Learn More) for all of their specialties and they want the Aria label / alt text to say “Learn more about [INSERT XYZ specialty]” so that screen readers can understand which specialty the link is for.
I don’t believe this is something we have today – can you clarify? Do we have a workaround for this and/or is it something coming in a new version?
More information on how to use aria-labels are outlined in W3C’s guidelines.
In the component.js file for the card, add the ariaLabel in your CTAs under dataForRender and set it to the appropriate text / field, for example:
CTA1: {
label: "My CTA Label",
iconName: 'chevron',
url: "#",
target: '_top',
eventType: 'CTA_CLICK',
eventOptions: this.addDefaultEventOptions(),
ariaLabel: "Learn more about this product" //newly added label, can pull from the profile or be hardcoded
},
This ariaLabel in dataForRender will be passed into the handlebars template for the card that you edited in step 2.
Generally this attribute makes sense to build in by default, I’ll make a request to do so (so you won’t need to edit the component.hbs file to configure the label).