Skip to content
Discussion options

You must be logged in to vote

From an accessibility perspective, you generally want to avoid generic link labels like “Watch now”, since they don’t provide any hint of what’s behind the hyperlink. So I don’t think Craft should do anything to enable/encoruage generic link labels like this.

Instead, maybe create a separate “Button Label” Plain Text field, with “Watch Now” placeholder text, and use that for the visually-shown button label.

Make sure you still give the button an accessible hidden label, too, e.g.

{% set ariaLabel = "#{entry.buttonLabel} about #{entry.linkField.label}" %}

<button aria-label="{{ ariaLabel }}">
  {{ entry.buttonLabel }}
</button>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ryanleichty
Comment options

Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants