Ui ux design

From Hack23/riksdagsmonitor · View interactive version

Ui ux design is an AI agent skill from the GitHub repository Hack23/riksdagsmonitor. User experience design, usability testing, information architecture, accessibility (WCAG 2.1 AA), mobile-first design for political transparency platforms

How to use this skill

Skill file

UI/UX Design Skill

๐Ÿ”ด AI FIRST Quality Principle

Apply the AI FIRST principle: never accept first-pass quality. Minimum 2 iterations. Read all output, improve every section. No shortcuts.

Purpose

Comprehensive user experience and interface design guidance for Riksdagsmonitor, ensuring intuitive, accessible, and engaging experiences for diverse user groups across all 14 language versions.

Core Principles

1. ๐Ÿ‘ฅ User-Centered Design

2. โ™ฟ Accessibility First (WCAG 2.1 AA)

3. ๐Ÿ“ฑ Mobile-First Responsive

4. ๐ŸŽจ Design System Consistency

User Research

Primary User Personas

1. ๐Ÿ“ฐ Investigative Journalist (Sara)

Demographics: 35, Svenska Dagbladet, Stockholm

Goals:

Pain Points:

Design Priorities:

2. ๐ŸŽ“ Political Science Researcher (Erik)

Demographics: 42, Uppsala University, researcher

Goals:

Pain Points:

Design Priorities:

3. ๐Ÿ‘ฅ Engaged Citizen (Anna)

Demographics: 28, Gothenburg, first-time voter

Goals:

Pain Points:

Design Priorities:

4. ๐Ÿข Corporate Affairs Manager (Johan)

Demographics: 45, multinational corporation, lobbyist

Goals:

Pain Points:

Design Priorities:

Information Architecture

Site Structure

Riksdagsmonitor (Home)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“Š Dashboards
โ”‚   โ”œโ”€โ”€ Voting Discipline
โ”‚   โ”œโ”€โ”€ Committee Effectiveness
โ”‚   โ”œโ”€โ”€ Coalition Alignment
โ”‚   โ”œโ”€โ”€ Party Comparison
โ”‚   โ”œโ”€โ”€ Election Forecasting
โ”‚   โ”œโ”€โ”€ Risk Assessment
โ”‚   โ””โ”€โ”€ Ministry Performance
โ”‚
โ”œโ”€โ”€ ๐Ÿ‘ฅ MPs (Ledamรถter)
โ”‚   โ”œโ”€โ”€ Search/Filter
โ”‚   โ”œโ”€โ”€ Individual Profiles
โ”‚   โ””โ”€โ”€ Comparison Tool
โ”‚
โ”œโ”€โ”€ ๐Ÿ—ณ๏ธ Votes (Voteringar)
โ”‚   โ”œโ”€โ”€ Recent Votes
โ”‚   โ”œโ”€โ”€ Historical Trends
โ”‚   โ””โ”€โ”€ Party Positions
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‹ Committees (Utskott)
โ”‚   โ”œโ”€โ”€ Committee Overview
โ”‚   โ”œโ”€โ”€ Effectiveness Metrics
โ”‚   โ””โ”€โ”€ Member Lists
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ฐ News & Analysis
โ”‚   โ”œโ”€โ”€ Latest Updates
โ”‚   โ”œโ”€โ”€ Weekly Reports
โ”‚   โ””โ”€โ”€ Quarterly Reviews
โ”‚
โ”œโ”€โ”€ ๐Ÿ“š About
โ”‚   โ”œโ”€โ”€ Methodology
โ”‚   โ”œโ”€โ”€ Data Sources
โ”‚   โ”œโ”€โ”€ Privacy Policy
โ”‚   โ””โ”€โ”€ Contact
โ”‚
โ””โ”€โ”€ ๐Ÿ”— Resources
    โ”œโ”€โ”€ API Documentation
    โ”œโ”€โ”€ Glossary
    โ””โ”€โ”€ User Guide

Navigation Patterns

Primary Navigation
<nav class="primary-nav" aria-label="Main navigation">
  <ul>
    <li><a href="#dashboards">Dashboards</a></li>
    <li><a href="#mps">MPs</a></li>
    <li><a href="#votes">Votes</a></li>
    <li><a href="#committees">Committees</a></li>
    <li><a href="#news">News</a></li>
  </ul>
</nav>
Secondary Navigation (Contextual)

Visual Design

Color Palette (Cyberpunk Theme)

/* Primary Colors */
--primary-cyan: #00d9ff;      /* Data points, links */
--primary-magenta: #ff006e;   /* Alerts, critical items */
--primary-yellow: #ffbe0b;    /* Highlights, warnings */

/* Background Colors */
--dark-bg: #0a0e27;           /* Main background */
--mid-bg: #1a1e3d;            /* Cards, panels */
--light-bg: #2a2e4d;          /* Hover states */

/* Text Colors */
--light-text: #e0e0e0;        /* Body text */
--mid-text: #a0a0a0;          /* Secondary text */
--dark-text: #606060;         /* Disabled text */

/* Semantic Colors */
--success: #00ff88;           /* Positive trends */
--warning: #ffbe0b;           /* Caution items */
--error: #ff006e;             /* Errors, high risk */
--info: #00d9ff;              /* Information, tooltips */

Typography

/* Font Families */
--font-primary: 'Inter', sans-serif;      /* Body, UI */
--font-heading: 'Orbitron', sans-serif;   /* Headings, emphasis */
--font-mono: 'Fira Code', monospace;      /* Code, data */

/* Font Sizes (Fluid Typography) */
--font-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);   /* 12-14px */
--font-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);     /* 14-16px */
--font-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);     /* 16-18px */
--font-lg: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);     /* 20-24px */
--font-xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);           /* 24-32px */
--font-2xl: clamp(2rem, 1.7rem + 1.5vw, 3rem);          /* 32-48px */

/* Line Heights */
--leading-tight: 1.25;     /* Headings */
--leading-normal: 1.5;     /* Body text */
--leading-relaxed: 1.75;   /* Long-form content */

Spacing System

/* Spacing Scale (4px base) */
--space-xs: 0.25rem;   /* 4px */
--space-sm: 0.5rem;    /* 8px */
--space-md: 1rem;      /* 16px */
--space-lg: 1.5rem;    /* 24px */
--space-xl: 2rem;      /* 32px */
--space-2xl: 3rem;     /* 48px */
--space-3xl: 4rem;     /* 64px */

UI Components

Dashboard Cards

<div class="dashboard-card">
  <header class="card-header">
    <h3 class="card-title">Voting Discipline</h3>
    <button class="card-action" aria-label="More options">โ‹ฎ</button>
  </header>
  <div class="card-body">
    <canvas id="votingDisciplineChart"></canvas>
  </div>
  <footer class="card-footer">
    <span class="card-meta">Updated: 2026-02-11</span>
    <a href="#details" class="card-link">View details โ†’</a>
  </footer>
</div>

Data Tables

<table class="data-table" role="table">
  <thead>
    <tr>
      <th scope="col" role="columnheader">
        MP Name
        <button aria-label="Sort by name">โ†•</button>
      </th>
      <th scope="col" role="columnheader">Party</th>
      <th scope="col" role="columnheader">Risk Score</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Anna Svensson</td>
      <td>S</td>
      <td><span class="badge badge-high">7.2</span></td>
    </tr>
  </tbody>
</table>

Filters & Search

<div class="filter-panel">
  <div class="search-box">
    <label for="search" class="sr-only">Search MPs</label>
    <input 
      type="search" 
      id="search" 
      placeholder="Search by name, party, committee"
      aria-describedby="search-help"
    >
  </div>
  
  <fieldset class="filter-group">
    <legend>Filter by Party</legend>
    <label>
      <input type="checkbox" name="party" value="S"> 
      <span>Socialdemokraterna (S)</span>
    </label>
    <!-- Repeat for other parties -->
  </fieldset>
</div>

Loading States

<!-- Skeleton Loader -->
<div class="skeleton-card" aria-busy="true" aria-label="Loading content">
  <div class="skeleton-header"></div>
  <div class="skeleton-body">
    <div class="skeleton-line"></div>
    <div class="skeleton-line"></div>
    <div class="skeleton-line short"></div>
  </div>
</div>

<!-- Spinner (fallback) -->
<div class="spinner" role="status">
  <span class="sr-only">Loading...</span>
</div>

Responsive Breakpoints

/* Mobile First Approach */

/* Extra Small: 320px - 479px (default, no media query) */
/* Small Phones */

/* Small: 480px - 767px */
@media (min-width: 30em) { /* 480px */
  /* Larger phones, portrait tablets */
}

/* Medium: 768px - 1023px */
@media (min-width: 48em) { /* 768px */
  /* Tablets, landscape */
}

/* Large: 1024px - 1279px */
@media (min-width: 64em) { /* 1024px */
  /* Small laptops, desktops */
}

/* Extra Large: 1280px - 1919px */
@media (min-width: 80em) { /* 1280px */
  /* Desktops, large screens */
}

/* XXL: 1920px+ */
@media (min-width: 120em) { /* 1920px */
  /* Very large screens */
}

Accessibility Checklist

WCAG 2.1 AA Compliance

Perceivable
Operable
Understandable
Robust

Usability Testing

Testing Methods

1. Hallway Testing (Guerrilla Testing)
2. Remote Moderated Testing
3. A/B Testing
4. Analytics Review

Key Usability Metrics

Task Success Rate:
  Target: >80% users complete primary tasks
  Measured: Can users find MP profile, view voting record, filter by party?

Time on Task:
  Target: <2 minutes for common tasks
  Measured: How long to find specific information?

Error Rate:
  Target: <5% errors per task
  Measured: Clicks on wrong elements, navigation mistakes

System Usability Scale (SUS):
  Target: >68 (above average)
  Measured: 10-question standardized survey

Net Promoter Score (NPS):
  Target: >30 (good for B2B SaaS)
  Measured: "How likely to recommend 0-10?"

Multi-Language Considerations

RTL (Right-to-Left) Support

/* RTL-Aware Styles */
[dir="rtl"] .element {
  direction: rtl;
  text-align: right;
}

/* Logical Properties (works for both LTR/RTL) */
.element {
  margin-inline-start: 1rem;   /* Not margin-left */
  padding-inline-end: 0.5rem;  /* Not padding-right */
}

Cultural Adaptations

Performance Optimization

Core Web Vitals

Largest Contentful Paint (LCP):
  Target: <2.5s
  Strategies:
    - Optimize images (WebP, lazy loading)
    - Minimize CSS blocking
    - CDN for static assets

First Input Delay (FID):
  Target: <100ms
  Strategies:
    - Minimize JavaScript execution
    - Code splitting, defer non-critical JS
    - Use web workers for heavy computation

Cumulative Layout Shift (CLS):
  Target: <0.1
  Strategies:
    - Set explicit width/height for images
    - Reserve space for dynamic content
    - Avoid injecting content above fold

Image Optimization

<!-- Responsive Images -->
<picture>
  <source srcset="dashboard-mobile.webp" media="(max-width: 767px)" type="image/webp">
  <source srcset="dashboard-tablet.webp" media="(max-width: 1023px)" type="image/webp">
  <source srcset="dashboard-desktop.webp" type="image/webp">
  <img src="dashboard-desktop.jpg" alt="Voting discipline dashboard" loading="lazy">
</picture>

Remember


Last Updated: 2026-02-11

Maintained by: Hack23 AB

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.