100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.
Modality-Agnostic Web Standard Concept
Original Question
Imagine we were going to create a web standard, but this would be for apps. If everyone kept using the same CSS, JS, HTML buttons etc, and kept trying to make it easier on everyone and considered touch interface as first class instead of coming after, but the mouse or speaking was also an option or even augmented reality where people can't even click or hover as you traditionally do. Think hard on what we need to come up with. And how do you make it so things don't break over time?
Response: The Core Problem
Current web development has a fundamental mismatch:
- We design for mouse (hover, click), then retrofit touch, voice, AR as afterthoughts
- We build with low-level primitives (div, span, button) that are implementation-focused, not intent-focused
- Standards break over time because we couple to implementation details, not semantics
The Key Insight: Intent Over Implementation
Instead of thinking "the user will click this button," think "the user wants to perform an action."
The system should map user intent to whatever modality is available:
Interaction Intents (Modality-Agnostic)
USER INTENT → TOUCH → MOUSE → VOICE → AR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
activate (primary) → tap → click → "activate" → gaze+gesture
inspect (preview) → long-press → hover → "what is" → gaze+dwell
context (options) → long-press → right-click → "options" → gesture menu
adjust (value) → drag → drag/scroll → "increase" → hand tracking
dismiss (close) → swipe → esc/click → "close" → gesture away
No more onClick, onHover, onTouch. Just: what does the user want to do?
Proposed Standard: Semantic App Components
1. Components Express Intent, Not Implementation
<!-- Instead of this (implementation-focused): -->
<button onclick="save()" onmouseover="showTooltip()">
Save Document
</button>
<!-- This (intent-focused): -->
<app:action intent="primary" on:activate="save">
<app:label>Save Document</app:label>
<app:description>Saves current changes</app:description>
</app:action>
The system decides:
- Touch: Large tap target (44×44pt minimum)
- Mouse: Hover effects, click handling
- Voice: Registers "save document" command
- AR: Creates interaction volume in 3D space
- All: Proper ARIA, keyboard support, haptics
2. Core Component Categories
Actions (things users do)
<app:action intent="primary|secondary|tertiary"
sentiment="constructive|destructive|neutral">
Navigation (moving through content)
<app:navigator type="sequential|hierarchical|spatial">
<!-- System provides: swipe, arrows, voice commands, AR waypoints -->
</app:navigator>
Input (providing information)
<app:input type="choice|range|text"
constraints="...">
<!-- System provides: appropriate keyboard, voice input, gestures -->
</app:input>
Feedback (system → user communication)
<app:feedback type="state|notification|confirmation"
urgency="high|medium|low">
3. Capability Negotiation, Not Feature Detection
<app:requires>
<capability>user-activation</capability>
<capability>sequential-navigation</capability>
<capability>value-adjustment</capability>
</app:requires>
System provides the best implementation for available modalities. No more "does this browser support touch events?"
Preventing Breakage Over Time
Versioned Semantics (Immutable Meaning)
<app:action version="1.0" intent="primary">
- Semantic stability:
intent="primary"always means "the main thing the user wants to do" - Implementation evolution: How it renders/behaves can improve, but meaning is locked
- Additive only: Version 2.0 adds capabilities, never breaks 1.0 semantics
This is like HTML's <a> tag: meant "link" in 1993, still means "link" in 2025, but implementation has evolved dramatically (keyboard nav, touch targets, screen readers).
Separation of Concerns
┌─────────────────────────────────────┐
│ SEMANTIC LAYER (Developer writes) │ ← Stable, versioned
│ "User wants to do primary action" │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ ADAPTATION LAYER (System manages) │ ← Can evolve
│ Maps intent → modality │
└─────────────────────────────────────┘
↓
┌─────────────────────────────────────┐
│ PRESENTATION LAYER (Themeable) │ ← Can evolve
│ Visual/haptic/audio rendering │
└─────────────────────────────────────┘
Developers only touch the semantic layer. System handles adaptation and presentation.
Graceful Degradation by Design
Every component must answer:
- "What if there's no touch?"
- "What if there's no screen?"
- "What if there's no sound?"
The system provides fallbacks:
<app:action intent="primary" fallback="accessible-html">
<!-- If browser doesn't support app:action,
renders as semantic HTML button with ARIA -->
</app:action>
No Breaking Removals
- Old versions continue to work forever
- New implementations must support old semantics
- Deprecated features marked but never removed
- Polyfill layer for older runtimes
Example: A Real-World Component
Today (fragile, mouse-centric):
<div class="card" onmouseover="expand()" onclick="navigate()">
<img src="...">
<h2>Title</h2>
<button onclick="share()">Share</button>
</div>
Problems:
- Hover doesn't work on touch
- Click conflicts with button click
- No voice/AR support
- Will break if CSS framework changes
- Accessibility is manual
Future (intent-based, modality-agnostic):
<app:card version="1.0">
<app:content on:inspect="preview" on:activate="navigate">
<app:media src="..." alt="..."/>
<app:label importance="high">Title</app:label>
</app:content>
<app:actions>
<app:action intent="secondary" on:activate="share">
Share
</app:action>
</app:actions>
</app:card>
System provides:
- Touch: Tap navigates, long-press shows preview, secondary actions in context menu
- Mouse: Hover shows preview, click navigates, share button visible
- Voice: "What is [title]" → preview, "Open [title]" → navigate, "Share [title]" → share
- AR: Gaze highlights, dwell shows preview, gesture selects, actions appear in spatial UI
- All: Keyboard navigation, screen reader support, haptics, proper focus management
It never breaks because:
- Semantics are versioned and immutable
- Implementation is abstracted away
- Graceful degradation is built-in
- System evolves without breaking developer code
The Path Forward
- Start with interaction primitives, not visual components
- Model user intent, not implementation details
- Treat all modalities as first-class from day one
- Version semantics, not APIs
- Hide implementation, expose meaning
- Make graceful degradation automatic, not opt-in
This is essentially what SwiftUI/Jetpack Compose do for native apps: you describe what the UI should do, the framework handles how across different devices/inputs. We need this for the web, but even more radical because the web spans more contexts than any other platform.
The web lasted 30+ years because HTML semantics are stable. We need that same stability, but at the app component level, not just the document level.
This IS The Semantic Web (The Real One)
For decades, people talked about the "Semantic Web" but focused on the wrong semantics:
What they built (Data semantics):
- RDF triples and ontologies
- Machine-readable metadata about "things"
- Linked data and knowledge graphs
- Teaching machines: "This is a Person with properties"
What we actually need (Interaction semantics):
- Intent-based UI primitives
- Machine-understandable user actions
- Modality-agnostic interaction models
- Teaching systems: "The user wants to ACTIVATE this, regardless of how"
The Two Semantic Webs
┌─────────────────────────────────────────────────────────┐
│ SEMANTIC WEB 1.0 (What we got) │
│ ─────────────────────────────────────────────────────── │
│ Problem: "What does this DATA mean?" │
│ Solution: RDF, OWL, microformats │
│ Result: Machines can understand nouns │
│ Missing: Humans still can't USE it across contexts │
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
│ SEMANTIC WEB 2.0 (What we need) │
│ ─────────────────────────────────────────────────────── │
│ Problem: "What does this INTERACTION mean?" │
│ Solution: Intent-based components, modality adaptation │
│ Result: Systems understand verbs (user actions) │
│ Impact: Humans can interact regardless of modality │
└─────────────────────────────────────────────────────────┘
Why This Changes Everything
The original semantic web failed to achieve widespread adoption because:
- It didn't solve a problem users felt
- It required extra work from developers
- Benefits were abstract and distant
Interaction semantics solve immediate problems:
- ✅ Developer writes once, works everywhere (touch, mouse, voice, AR)
- ✅ Accessibility is automatic (screen readers understand intent)
- ✅ Future-proof (new modalities map to existing intents)
- ✅ Performance (system can optimize based on intent)
- ✅ Testing (test intent, not implementation)
The HTML Parallel
HTML succeeded because it had semantic document structure:
<article>
<h1>Title</h1>
<p>Paragraph</p>
<nav>Navigation</nav>
</article>
Not: "div class='title-24pt-bold'"
We need the same for semantic interaction structure:
<app:action intent="primary" on:activate="save">
Save Document
</app:action>
Not: "div class='button' onclick='...'"
The Real Semantic Web Stack
Layer 4: PRESENTATION (How it looks)
↓ Themeable, styleable
Layer 3: MODALITY ADAPTATION (How you interact)
↓ Touch, mouse, voice, AR, future...
Layer 2: INTERACTION SEMANTICS (What you want to do) ← THE MISSING LAYER
↓ Activate, inspect, adjust, navigate
Layer 1: DATA SEMANTICS (What things are)
↓ RDF, schema.org, microformats
Layer 0: HTML/HTTP (Transport)
Layer 2 is what the Semantic Web movement missed.
They tried to jump from Layer 0 (HTML) to Layer 1 (data semantics) without solving Layer 2 (interaction semantics).
But users don't care about data ontologies. They care about doing things - and those things should work the same way whether they're using a mouse, their voice, or their hands in AR space.
This Is What They Meant To Build
When Tim Berners-Lee talked about the Semantic Web, the vision was right: machines understanding meaning so they can better serve humans.
But the implementation focused on nouns (data) instead of verbs (actions).
We need a web where:
- A button isn't "a rectangle with onClick" - it's "a primary action the user wants to perform"
- A slider isn't "a draggable div" - it's "a way to adjust a value"
- A card isn't "a clickable container" - it's "content you can inspect and navigate to"
That's the semantic web we should have built. And it's not too late.
Context-Aware Priority Negotiation
Modalities themselves have sub-contexts that require different adaptations:
Voice Modality Contexts
Voice + Screen (multimodal)
- Short command hints visible
- Minimal verbal descriptions (screen provides context)
- Example: "Say 'save' or 'delete'" not "You can save the document or delete it"
Voice Only (unimodal)
- Rich verbal descriptions required
- State must be communicated audibly
- Example: "Your document 'Proposal Draft' has unsaved changes in 3 sections. Would you like to save, continue editing, or discard changes?"
Noisy Environment
- Require explicit confirmation
- Increase visual/haptic feedback
- Example: "Did you say 'delete'? Tap the screen to confirm"
Quiet/Private
- Can use subtle audio cues
- Whisper mode for privacy
- Background ambient sounds for state
Screen Modality Contexts
Single User
- Personalized content
- Can display sensitive information
- Detailed interactions available
Multiple Viewers (presentation/meeting)
- Larger text for distance viewing
- Hide personal/sensitive data
- Simplified, social-appropriate UI
- Clear active user indication
Public Display
- Auto-timeout on inactivity
- No sensitive information
- "Attract mode" when idle
- Gesture-based interaction (no touching shared surface)
The Attention Economy: Components as Competing Entities
Every component needs to negotiate for limited resources:
<app:action
intent="primary"
urgency="critical"
priority="user-initiated"
attention-weight="100">
Save Document
</app:action>
<app:feedback
type="notification"
urgency="low"
priority="passive-info"
attention-weight="20"
can-defer="true"
can-collapse="true">
Software update available
</app:feedback>
<app:notification
urgency="high"
priority="time-sensitive"
attention-weight="80"
expires="2024-01-15T10:00:00Z">
Meeting starts in 5 minutes
</app:notification>
Priority Hierarchy
Components declare their importance across dimensions:
Urgency Levels:
critical- Security, data loss prevention, errors blocking workhigh- Time-sensitive, user-waitingmedium- Important but not blockinglow- Informational, can defer
Priority Types:
user-initiated- User explicitly triggered this (highest)user-requested- User asked to be notifiedtime-sensitive- Deadline approachingsystem-critical- System needs attentionpassive-info- Background informationpromotional- Can be hidden/collapsed
Resource Negotiation:
Available:
- Screen space: 1920x1080px
- Audio time: User attention span ~7 seconds
- Cognitive load: Maximum 3 simultaneous attention points
Components bid:
1. [CRITICAL] "Unsaved changes" → Gets: Modal dialog, audio alert, haptic
2. [HIGH] "Meeting in 5min" → Gets: Persistent notification, audio mention
3. [MEDIUM] "3 new messages" → Gets: Badge indicator
4. [LOW] "Update available" → Gets: Deferred to idle time
Result: System allocates resources based on context + priority
Context-Adaptive Component Example
<app:notification id="team-message" urgency="medium">
<metadata>
<attention-weight>60</attention-weight>
<can-defer>true</can-defer>
<can-summarize>true</can-summarize>
</metadata>
<!-- Voice-only context: Full detail needed -->
<voice-only>
You have 3 unread messages in the team channel.
The most recent is from Sarah, sent 5 minutes ago:
"Meeting has been moved to 3pm today."
Would you like to hear the other messages?
</voice-only>
<!-- Voice + Screen: Minimal verbal, visual support -->
<voice-with-screen>
3 new team messages. Say "read messages" for details,
or check the screen.
</voice-with-screen>
<!-- Screen-only: Compact visual -->
<screen-only>
<badge>3</badge>
<preview>Sarah: Meeting moved to 3pm</preview>
</screen-only>
<!-- Noisy environment: Emphasize visual -->
<noisy-environment>
<visual-emphasis>high</visual-emphasis>
<require-confirmation>true</require-confirmation>
<haptic-pattern>double-tap</haptic-pattern>
</noisy-environment>
<!-- Multiple viewers: Privacy-aware -->
<multi-viewer>
<hide-content>true</hide-content>
<show-summary>3 new messages</show-summary>
<require-authentication>true</require-authentication>
</multi-viewer>
<!-- Low attention context: Defer -->
<user-busy>
<defer-until>idle</defer-until>
<max-defer-time>30min</max-defer-time>
</user-busy>
</app:notification>
Environmental Adaptation
The system monitors:
- Ambient noise level → Adjust voice recognition sensitivity, require confirmations
- Number of people present → Privacy mode, presentation mode
- Lighting conditions → Adjust contrast, color schemes
- Time of day → Reduce alerts during focus hours
- User activity state → Defer non-critical during active work
- Device orientation/position → Optimize layout, enable/disable modalities
Priority Resolution Algorithm
FOR each component requesting attention:
score = (urgency × urgency_weight) +
(priority × priority_weight) +
(time_sensitivity × time_weight) -
(user_disruption × disruption_penalty)
SORT components by score
ALLOCATE resources in order until exhausted
DEFER remaining components based on can-defer flag
COLLAPSE/SUMMARIZE low-priority if needed
Why This Matters
Without context-aware negotiation:
- 10 notifications interrupt your meeting presentation
- Voice assistant reads 5 paragraphs when you just need yes/no
- Personal calendar events display on the conference room screen
- Critical error gets buried under promotional messages
With context-aware negotiation:
- Critical items get immediate attention in appropriate modality
- Non-critical information defers until user is idle
- System adapts to environment (noise, viewers, lighting)
- User cognitive load remains manageable
- Privacy automatically protected in multi-user contexts
Every component becomes context-aware by default, not through developer effort but through semantic declarations of intent and importance.