Search
Enter at least two characters without personal information.

    LibraryArticles & FAQ Your projectRequest a quote
    LanguageEN
    Practical guides

    Choose and test web interface components

    An interface component is a reusable control, field, navigation element or presentation of data. Appearance alone does not determine its purpose. A useful choice helps people anticipate what will happen, complete the action and find their place afterwards.

    Go to the method

    People organising notes on a wall
    AI-generated illustration

    Start with the task

    Write the task in one sentence: read terms, choose a town, compare offers or confirm a deletion. Describe what changes afterwards: the address, displayed content, a field value or saved data. This distinction helps choose between a link, button, input and dialog.

    Begin with the simplest presentation that meets the need. A list of links may be enough where complex navigation would add interactions. Information needed by everyone can stay visible. Click count alone does not establish how easy a journey is.

    Specify a behaviour contract

    Record each component’s visible name, states, available actions and focus destination. The W3C ARIA practices explain that an announced role carries behavioural expectations: adding ARIA does not implement interaction. Prefer native HTML elements when they meet the need.

    Include conditions outside the demonstration: long text, missing data, delay, cancellation, errors and concurrent changes. Specify what is saved and what remains provisional. Someone reviewing a design should be able to distinguish an accepted request from a button animation.

    Choose a topic by the decision required

    The following guides address distinct tasks: reveal supporting information, change views, select a value, manage an interruption, read data or reorder items. They extend the general accessibility guide and do not certify a website.

    Once a choice is made, enter a task and expected result in the acceptance log. Test a real occurrence, followed by variants in a form, catalogue and translated page. A correction to a shared component needs checks in those contexts.

    Compare alternatives on the same task

    Educational example: a team compares three tabs with three visible sections for presenting offers. Participants find a condition and compare two services on a phone. The team records backtracking, missed details and whether the relevant information can be shared. If people need to read all three parts together, visible sections may suit the task better.

    Review places where an interface injects HTML constructed from data.

    Synthetic case: a card receives a description containing test markup. Prefer text insertion when HTML is unnecessary. When using a Trusted Types policy, verify its transformation: returning an unchanged string does not make it safe. Test affected components and target browsers before enforcing the policy.

    • Text stays text; permitted HTML follows a tested transformation without a permissive default policy.
    • MDN Trusted Types

      API governing values transformed by a policy before they reach selected DOM operations that may execute content.

    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
    Component choiceThe task and resulting change are explicitDescribed task, component choice and comparison with a simpler HTML control where possible.
    Incomplete statesWaiting, failure and cancellation have an outcomeScreenshots and scenario results
    Keyboard and phoneThe task finishes with understandable focusJourney, environment and findings
    MaintenanceAn owner and variants are identifiedPage list and repeat-check criteria

    Frequently asked questions

    Does each page need a custom component?

    Reuse a proven model when behaviour is the same. Adapt wording and data. A variant that changes controls or focus handling needs its own check.

    Is a library component automatically accessible?

    Its quality also depends on version, integration and content. Review the documentation, then test the real task with relevant browsers and assistive technologies.

    Do these guides replace an accessibility audit?

    They support targeted interaction design and testing. An audit also examines structure, content, media, contrast and complete journeys against the applicable framework.