interface / @typed/ui/index

Role.RoleOptions

Options for assigning explicit ARIA semantics to a generic host.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Semantic hosts
Since
1.0.0
Member of
Role

Import

import { Role } from "@typed/ui/index";

Access Role.RoleOptions through the imported Role export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export interface RoleOptions extends Dom.HostOptions<HTMLDivElement> {
    readonly content: Renderable.Any;
    readonly role: Renderable.Any<string | null | undefined>;
}

Why

This primitive keeps role selection visible when no dedicated component matches the required semantic.

Ownership and lifetime

The model acquires no resources; dynamic values follow the rendered Scope.

Property: content

Content rendered inside the semantic host.

Property: content: Why

Native content remains available to the accessibility tree.

Property: content: Ownership and lifetime

Dynamic content follows the component Scope.

Property: role

The explicit ARIA role.

Property: role: Why

Callers must choose semantics appropriate to their interaction model.

Property: role: Ownership and lifetime

The reflected value retains no resources.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source