Skip to content

[Feature Request]: ButtonLink #13376

@jak-ch-ll

Description

@jak-ch-ll

Feature Request Description

A component that looks like a ui5-button but behaves like an <a> tag

Proposed Solution

A href property for the ui5-button that, if used, automatically changes the underlying element from a <button> to an <a> but otherwise keeps the styles.

In a future improvement the same could be done for other buttons or button-like components (e.g. ui5-toolbar-button and ui5-menu-item)

Proposed Alternatives

A separate ui5-button-link component that offers the same functionality of the ui5-button but is an <a> tag underneath

Organization

aconso

Additional Context

It is currently possible to set the accessibleRole attribute of the ui5-button but that does not give the button the typical features that users might expect from a link (like display link on hover, middle click to open in new tab, right click functionality, etc.).

Even from an accessibility viewpoint the current solution is incomplete, because a screen readers would not have access to the target url.

It's generally recommended to avoid the link role and use <a> instead: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/link_role

Priority

None

Privacy Policy

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions