# RJ Signal UI - Browser-first adapter Version 1.0.0 | Reviewed 11 November 2026 | Canonical: https://rajajeevan.com/brand/#ui-kit ## Contents - [Scope and library choice](#scope-and-library-choice) - [DOM and styling rules](#dom-and-styling-rules) - [Data and business logic](#data-and-business-logic) - [Browser capabilities](#browser-capabilities) - [Start and verify](#start-and-verify) ## Scope and library choice Use semantic HTML first. The runnable demo.html has no framework, network calls, analytics, fonts, icons or package dependencies. It demonstrates a responsive list/detail screen, state filtering, validation, a real dialog, theme switching and a polite status region. It is a starter, not a production backend or exhaustive component library. For React apps needing complex widgets, choose one primary headless behaviour layer: React Aria for detailed collection/forms/internationalisation work, or Radix Primitives for composable web primitives. These are choices, not interchangeable APIs. Fluent UI React v9 is a separate styled system for enterprise-web surfaces. Do not mix v8/v9 APIs casually; verify installed package and provider contracts. No package is required by this kit. ## DOM and styling rules - Use button for commands, a with href for navigation, label for fields, fieldset/legend for groups and table for tabular reading. No clickable div stand-ins. - tokens.css owns semantic roles, colour-scheme, reduced-motion and forced-colour rules. App CSS is scoped to .rj-ui. Do not reset all elements on a host website. - Logical padding/margins and direction-aware icons support RTL. Text expansion must not clip labels. Avoid fixed heights around text. Keep DOM reading order meaningful when layout changes. - Web body at least 16 px, 200% text enlargement without lost controls; test 400% browser zoom/reflow as applicable. APG widget keyboard patterns supplement, not replace, native HTML. - Native dialog.showModal supplies modal behaviour in supported browsers. Label it, select initial focus deliberately, return focus to trigger, and test Escape. Provide a supported fallback for the project's browser matrix rather than silently using an unsupported API. - Focus ring must not be clipped by overflow or obscured by sticky bars. Do not remove outline without an equivalent. Use aria-live for concise task results, not for every re-render. ## Data and business logic Keep rendering separate from domain operations. Example interface: ```ts export type LoadState = | { kind: 'idle' } | { kind: 'loading'; previous?: T } | { kind: 'ready'; data: T } | { kind: 'error'; message: string; retryable: boolean; previous?: T }; export type SaveResult = | { kind: 'saved'; id: string; revision: string } | { kind: 'conflict'; latestRevision: string } | { kind: 'unknown'; requestId: string } | { kind: 'rejected'; message: string }; ``` A product implements the service interface. Unknown state reconciles before retry; conflict preserves the local edit and offers compare/reload. Do not catch all errors and show 'Saved'. Output-escape untrusted strings; use textContent instead of innerHTML for user data. Validate on the server. Do not expose keys in JavaScript. ## Browser capabilities PWA installation, notifications, clipboard, file APIs and offline service workers depend on platform/browser permissions and support. Add only what a product needs. An offline cache must not silently retain sensitive records. Treat downloaded files as untrusted. Navigation should preserve deep links, browser Back, open-in-new-tab and reload state; do not turn every link into a JavaScript-only action. ## Start and verify Open demo.html locally for the dependency-free specimen. For network/API work use a local development server and the app's normal build. Import tokens.css once. Inspect tokens.json roles before adapting. Do not paste the entire demo CSS into a native app. Test keyboard-only complete flow, browser Back, labelled fields, screen-reader name/role/state, error focus, dialog focus restoration, zoom, 320 CSS px width, wide layout, dark, reduced motion, forced colours and touch input. Use automated accessibility checks as one input, followed by manual assistive-technology checks. No accessibility certification is claimed.