Skip to content

feat(ui): integrate KoliBri (Public UI) accessible web components - #1

Draft
deleonio wants to merge 1 commit into
mainfrom
claude/eager-wozniak-0j6orv
Draft

feat(ui): integrate KoliBri (Public UI) accessible web components#1
deleonio wants to merge 1 commit into
mainfrom
claude/eager-wozniak-0j6orv

Conversation

@deleonio

Copy link
Copy Markdown

Ziel

Barrierefreiheit der Landscape mit den KoliBri (Public UI) Web Components verbessern und dabei schrittweise möglichst viele kol-*-Komponenten einsetzen. Dieser PR legt die Grundlage (Phase 0) über alle vier UI-Pakete und liefert eine erste konkrete a11y-Verbesserung.

Änderungen

Infrastruktur (webapp, common, embed, embed-item)

  • @public-ui/components, @public-ui/solid, @public-ui/theme-default + Peer-Dependency adopted-style-sheets ergänzt
  • Gemeinsamer Helper registerKolibri() in common, der die Komponenten + Default-Theme einmalig registriert (ui/common/src/utils/registerKolibri.ts)
  • registerKolibri() wird vor render() in allen drei SPA-Einstiegspunkten aufgerufen (webapp/embed/embed-item), damit jedes <kol-*>-Element beim ersten Paint vorhanden ist
  • Jest-Stub für @public-ui/*, damit jsdom-Tests keine echten Web Components laden

Barrierefreiheit

  • Neuer Skip-to-Content-Link (kol-skip-nav) im Haupt-Layout, plus id="main" / tabindex=-1 auf dem Inhaltsbereich → Tastatur- und Screenreader-Nutzer können die Navigation überspringen (war bisher nicht vorhanden)

Architektur-Hinweise

  • Verwendung des offiziellen SolidJS-Adapters @public-ui/solid (typisierte Komponenten statt roher Custom Elements)
  • KoliBri rendert im Shadow DOM → bestehendes Bootstrap/CSS greift dort nicht; Theming erfolgt später über KoliBri-Theme-Layer (Default-Theme zuerst, markengetreues Custom-Theme als spätere Phase)
  • Event-Modell: _on={{ onClick }} statt nativem onClick

Verifikation

Prüfung webapp common embed embed-item
prettier (format:diff)
eslint (--max-warnings 0)
jest (41 Tests)
tsup-Build

tsc meldete ausschließlich zwei vorbestehende Fehler (fehlende WASM-Module wasm/quiz und wasm/overlay, die erst die Rust-/wasm-pack-Pipeline erzeugt) — der KoliBri-Code selbst ist typkorrekt.

⚠️ Noch nicht verifiziert: der vollständige Vite-Produktions-Build und ein Live-Browser-Test (Skip-Nav per Tab, erfolgreiche Registrierung), da wasm-pack und ein Landscape-Datensatz in der Umgebung fehlten. Bitte vor dem Merge in einer vollständigen Build-Umgebung gegenprüfen.

Roadmap (Folge-Commits in diesem PR / weitere PRs)

Phasenweiser Ausbau der Breite: kol-button (Buttons), kol-badge (Maturity-/Foundation-Badges), kol-nav (Header-Navigation), kol-pagination, kol-tabs, Formulare (kol-input-*, kol-select/combobox), kol-drawer, sowie kol-dialog/kol-table-*/kol-card (inkl. Fix des aktuellen „div-as-button"-Problems der Explore-Cards).


🤖 Generated with Claude Code

https://claude.ai/code/session_014F6qLzHChZwf1CTtL5mDRn


Generated by Claude Code

Establish the foundation for improving accessibility across the landscape
UI by adopting KoliBri (@public-ui) web components via the official SolidJS
adapter, and ship a first accessibility win.

Infrastructure (all packages):
- Add @public-ui/components, @public-ui/solid, @public-ui/theme-default and
  the adopted-style-sheets peer dependency to webapp, common, embed and
  embed-item.
- Add a shared registerKolibri() helper in common that registers the
  components and the default theme once per bootstrap.
- Call registerKolibri() before render() in the webapp, embed and embed-item
  entry points so every <kol-*> element is upgraded on first paint.
- Stub @public-ui/* in the webapp Jest config so jsdom tests do not load the
  real web components.

Accessibility:
- Add a skip-to-content link (kol-skip-nav) to the main layout and mark the
  main content region with id="main" / tabindex=-1, so keyboard and assistive
  technology users can bypass the navigation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014F6qLzHChZwf1CTtL5mDRn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants