Search
Enter at least two characters without personal information.

    LibraryArticles & FAQ Your projectRequest a quote
    LanguageEN
    Practical guides

    Choose interface links, buttons and actions

    A link reaches a destination; a button triggers an action. This distinction helps people anticipate outcomes, use the keyboard and retain browser functions. Shape or colour does not replace the control’s role.

    Go to the method

    Printed control layouts and tablet
    AI-generated illustration

    Describe the outcome in the label

    The W3C link and button patterns distinguish destination and action. “View prices” can open a page; “Send enquiry” submits a form. Retain that distinction even when controls look alike.

    Use a verb and object where they clarify consequences. Repeated “Learn more” links need identifiable context. Deletion or payment should name what is affected. An icon-only control needs an accessible name consistent with its visible purpose.

    Choose waiting and unavailable states

    Inside a form, the HTML button element needs an appropriate type: a secondary action should not accidentally submit. Native disabled prevents activation; aria-disabled announces a state but does not block the action itself.

    Explain why an important action is unavailable and how to enable it. An unexplained disabled control can leave people searching for an invisible error. During submission, keep a clear waiting state and recovery from failure; do not remove all explanation when activation is blocked.

    Fictional case: a form contains “Preview” and “Send”. Set type="button" for preview and type="submit" for submission. In an ordinary form, a button with no type can become a submit button; its colour or label does not change that behaviour. Test each control with a mouse, Enter and Space, then check that preview creates no enquiry.

    For an unavailable control, separate the announced state from execution. disabled is a Boolean HTML attribute: disabled="false" still leaves it present and does not enable the button. aria-disabled="true" exposes a state without blocking the action or changing tab order by itself. If this choice is needed, code must also prevent the operation; pointer-events: none does not cover the keyboard. Keep a visible explanation and check server-side conditions for a sensitive action.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Fictional exercise: button type, unavailability and actual result
    Test caseDeclaration examinedResult to check
    Preview within a formtype="button"No submission; only the intended preview occurs
    Submit the formtype="submit"The intended validation and submission journey runs
    Enable a native buttondisabled="false"Still disabled: remove the attribute or set the disabled property to false
    Announce an unavailable actionaria-disabled="true"Execution is also prevented by keyboard, with a useful explanation

    Prevent repeated operations at the right layer

    Blocking a button after a click can reduce repeated activation, but does not protect against another request or browser history. The service needs repetition handling appropriate to the consequence. Use test data and inspect the recorded outcome.

    Specify what cancellation cancels: a local edit, pending request or accepted operation. If saving finishes despite closing the window, its outcome must remain findable. Avoid labels implying a guarantee the system cannot deliver.

    Example: an enquiry with an attachment

    Educational example: Add document opens file selection without submitting; Send enquiry performs submission. After an error, the button becomes usable and fields remain. A second test repeats a test request and checks that one receipt does not mask two created cases.

    Choose an overlay suited to an action list rather than a modal confirmation.

    Synthetic case: a card offers a small action list. Open it with the keyboard, close it and continue through the page. A popover is not automatically an accessible menu: names, roles and navigation must match its actual content. Consider a modal dialog when a decision must precede all other interaction.

    • Opening and closing are predictable and interactions match the announced component type.
    • MDN Popover API

      HTML and JavaScript API for non-modal overlays that do not automatically disable the background.

    Reference documents

    Content updated on

    Acceptance matrix to adapt to your project

    These proposed checks use synthetic cases. Decide the required behaviour with the team, record the result and assign unresolved gaps before release.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Test cases, expected outcomes and useful evidence
    CaseExpected outcomeEvidence to retain
    Page linkAddress and browser functions remain usableAddress exposed by the link and destination reached normally then in a new tab.
    Secondary actionNo accidental submission occursAction and request count
    Unavailable controlCause and next step are understandableExplanation and availability condition
    Repeated test requestThe service follows the expected ruleRecorded result and confirmation

    Frequently asked questions

    Can a link look like a button?

    Yes, when it remains a link with a real destination. Appearance can express priority without changing the action’s nature.

    Does disabling prevent all duplicate requests?

    No. Requests can be repeated another way. Consequential operations need service-side handling and checks with test data.

    Why specify a form button’s type?

    It distinguishes an interface action from submission. An add or open command should not send the fields accidentally.