Skip to content

[Button] Align props more closely with Craft conventions (entry, link field, etc) #111

@joshuapease

Description

@joshuapease

https://craftcms.com/docs/5.x/reference/field-types/link.html#settings

  • Add ariaLabel
  • Change href to url (entries and link fields use url)
  • Consider title
  • Consider download
  • Align target prop to expect _blank
  • Adjust rel: rel: target == '_blank' ? 'noopener' : null,

Consider this syntax for attrs

{% tag el with {
   ...attrs,
    'aria-label': ariaLabel ??? attrs.ariaLabel ?? null,
} %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions