This feature is experimental. It may be changed or removed in a future version.
Enables keyboard interaction for elements that represent links or buttons.
To define the element's effect when activated, handle the up:click
event.
If you want Unpoly to treat this element like a hyperlink, set an [up-href]
attribute.
To make the link-like element as accessible as possible, it gains the following behaviors:
[role=link]
attribute so screen readers announce it as link.pointer
cursor when hovered over.up:click
event when activated.[up-instant]
attribute to make the element
activate on mousedown
instead of click
.To add these behaviors to existing elements without setting the [up-clickable]
,
push a selector into up.link.config.clickableSelectors
.