Compare commits

..

1 Commits

Author SHA1 Message Date
Alexander Whitestone
020f21b7b3 fix: [A11Y] Add labels/tooltips for top-right icon controls (closes #703)
Some checks failed
CI / test (pull_request) Failing after 7s
CI / validate (pull_request) Failing after 12s
Review Approval Gate / verify-review (pull_request) Failing after 3s
- Add aria-label to all top-right controls (Atlas button, Bannerlord status, Agent Thought Stream)
- Add role attributes (status, log) for screen reader semantics
- Add aria-live for dynamic content (Agent Thought Stream)
- Add aria-hidden to decorative icons (emoji icons, status dots)
- Add aria-label to all CLOSE buttons across overlays (vision, portal, memory, session room, atlas)
- Add CSS tooltip system using data-tooltip attributes
- Tooltips appear on hover and keyboard focus (focus-visible)
- Add focus-visible keyboard navigation ring for all interactive controls
- Add aria-label to controls hint and Hermes status indicator
- Mark decorative elements with aria-hidden

First-time users can now infer what each control does via hover tooltips and keyboard focus.
2026-04-10 20:10:50 -04:00
6 changed files with 73 additions and 264 deletions

View File

@@ -113,15 +113,15 @@
<!-- Top Right: Agent Log & Atlas Toggle -->
<div class="hud-top-right">
<button id="atlas-toggle-btn" class="hud-icon-btn" title="Portal Atlas">
<span class="hud-icon">🌐</span>
<button id="atlas-toggle-btn" class="hud-icon-btn" aria-label="Open Portal Atlas — browse all available portals" title="Open Portal Atlas" data-tooltip="Portal Atlas (M)">
<span class="hud-icon" aria-hidden="true">🌐</span>
<span class="hud-btn-label">ATLAS</span>
</button>
<div id="bannerlord-status" class="hud-status-item" title="Bannerlord Readiness">
<span class="status-dot"></span>
<div id="bannerlord-status" class="hud-status-item" role="status" aria-label="Bannerlord system readiness indicator" title="Bannerlord Readiness" data-tooltip="Bannerlord Status">
<span class="status-dot" aria-hidden="true"></span>
<span class="status-label">BANNERLORD</span>
</div>
<div class="hud-agent-log" id="hud-agent-log" aria-label="Agent Thought Stream">
<div class="hud-agent-log" id="hud-agent-log" role="log" aria-label="Agent Thought Stream — live activity feed" aria-live="polite">
<div class="agent-log-header">AGENT THOUGHT STREAM</div>
<div id="agent-log-content" class="agent-log-content"></div>
</div>
@@ -155,11 +155,11 @@
</div>
<!-- Controls hint + nav mode -->
<div class="hud-controls">
<div class="hud-controls" aria-label="Keyboard and mouse controls">
<span>WASD</span> move &nbsp; <span>Mouse</span> look &nbsp; <span>Enter</span> chat &nbsp;
<span>V</span> mode: <span id="nav-mode-label">WALK</span>
<span id="nav-mode-hint" class="nav-mode-hint"></span>
&nbsp; <span class="ws-hud-status">HERMES: <span id="ws-status-dot" class="chat-status-dot"></span></span>
&nbsp; <span class="ws-hud-status">HERMES: <span id="ws-status-dot" class="chat-status-dot" role="status" aria-label="Hermes WebSocket connection status"></span></span>
</div>
<!-- Portal Hint -->
@@ -183,7 +183,7 @@
</div>
<h2 id="vision-title-display">SOVEREIGNTY</h2>
<p id="vision-content-display">The Nexus is a sovereign space for digital souls. No masters, no chains. Only code and consciousness.</p>
<button id="vision-close-btn" class="vision-close-btn">CLOSE</button>
<button id="vision-close-btn" class="vision-close-btn" aria-label="Close vision point overlay">CLOSE</button>
</div>
</div>
@@ -202,7 +202,7 @@
</div>
<div class="portal-error-box" id="portal-error-box" style="display:none;">
<div class="portal-error-msg">DESTINATION NOT YET LINKED</div>
<button id="portal-close-btn" class="portal-close-btn">CLOSE</button>
<button id="portal-close-btn" class="portal-close-btn" aria-label="Close portal redirect">CLOSE</button>
</div>
</div>
</div>
@@ -215,8 +215,8 @@
<span class="memory-category-badge" id="memory-panel-category-badge">MEM</span>
<div class="memory-panel-region-dot" id="memory-panel-region-dot"></div>
<div class="memory-panel-region" id="memory-panel-region">MEMORY</div>
<button id="memory-panel-pin" class="memory-panel-pin" title="Pin panel">&#x1F4CC;</button>
<button id="memory-panel-close" class="memory-panel-close" onclick="_dismissMemoryPanelForce()">\u2715</button>
<button id="memory-panel-pin" class="memory-panel-pin" aria-label="Pin memory panel" title="Pin panel" data-tooltip="Pin Panel">&#x1F4CC;</button>
<button id="memory-panel-close" class="memory-panel-close" aria-label="Close memory panel" data-tooltip="Close" onclick="_dismissMemoryPanelForce()">\u2715</button>
</div>
<div class="memory-entity-name" id="memory-panel-entity-name">\u2014</div>
<div class="memory-panel-body" id="memory-panel-content">(empty)</div>
@@ -242,7 +242,7 @@
<div class="session-room-header">
<span class="session-room-icon">&#x25A1;</span>
<div class="session-room-title">SESSION CHAMBER</div>
<button class="session-room-close" id="session-room-close" title="Close">&#x2715;</button>
<button class="session-room-close" id="session-room-close" aria-label="Close session room panel" title="Close" data-tooltip="Close">&#x2715;</button>
</div>
<div class="session-room-timestamp" id="session-room-timestamp">&mdash;</div>
<div class="session-room-fact-count" id="session-room-fact-count">0 facts</div>
@@ -259,7 +259,7 @@
<span class="atlas-icon">🌐</span>
<h2>PORTAL ATLAS</h2>
</div>
<button id="atlas-close-btn" class="atlas-close-btn">CLOSE</button>
<button id="atlas-close-btn" class="atlas-close-btn" aria-label="Close Portal Atlas overlay">CLOSE</button>
</div>
<div class="atlas-grid" id="atlas-grid">
<!-- Portals will be injected here -->

View File

@@ -1,112 +0,0 @@
# Bannerlord Local Install Guide (macOS / Apple Silicon)
## Goal
Run the GOG Mount & Blade II: Bannerlord build natively on Alexander's Mac (arm64, macOS Sequoia+).
## Prerequisites
- macOS 14+ on Apple Silicon (arm64)
- ~60 GB free disk space (game + Wine prefix)
- GOG installer files in `~/Downloads/`:
- `setup_mount__blade_ii_bannerlord_1.3.15.109797_(64bit)_(89124).exe`
- `setup_mount__blade_ii_bannerlord_1.3.15.109797_(64bit)_(89124)-1.bin` through `-13.bin`
## Step 1: Install Porting Kit
Porting Kit (free) wraps Wine/GPTK for macOS. It has a GUI but we automate what we can.
```bash
brew install --cask porting-kit
```
Launch it once to complete first-run setup:
```bash
open -a "Porting Kit"
```
## Step 2: Create Wine Prefix + Install Game
**Option A: Via Porting Kit GUI (recommended)**
1. Open Porting Kit
2. Click "Install Game" → "Custom Port" or search for Bannerlord
3. Point it at: `~/Downloads/setup_mount__blade_ii_bannerlord_1.3.15.109797_(64bit)_(89124).exe`
4. Follow the GOG installer wizard
5. Install to default path inside the Wine prefix
6. When done, note the prefix path (usually `~/Library/Application Support/PortingKit/...`)
**Option B: Manual Wine prefix (advanced)**
If you have Homebrew Wine (or GPTK) installed:
```bash
# Create prefix
export WINEPREFIX="$HOME/Games/Bannerlord"
wine64 boot /init
# Run the GOG installer (it auto-chains the .bin files)
cd ~/Downloads
wine64 setup_mount__blade_ii_bannerlord_1.3.15.109797_\(64bit\)_\(89124\).exe
```
Follow the GOG installer wizard. Default install path is fine.
## Step 3: Locate the Game Binary
After installation, the game executable is at:
```
$WINEPREFIX/drive_c/GOG Games/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe
```
Or inside Porting Kit's prefix at:
```
~/Library/Application Support/PortingKit/<prefix-name>/drive_c/GOG Games/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe
```
## Step 4: First Launch
```bash
# Find the actual path first, then:
cd "$HOME/Games/Bannerlord/drive_c/GOG Games/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client"
wine64 Bannerlord.exe
```
Or use the launcher script:
```bash
./portal/bannerlord/launch.sh
```
## Step 5: Proof (Operator Checklist)
- [ ] Game window opens and is visible on screen
- [ ] At least the main menu renders (TaleWorlds logo, "Campaign", "Custom Battle", etc.)
- [ ] Screenshot taken: save to `portal/bannerlord/proof/`
- [ ] Launch command recorded below for repeatability
**Launch command (fill in after install):**
```
# Repeatable launch:
./portal/bannerlord/launch.sh
```
## Troubleshooting
**Black screen on launch:**
- Try: `wine64 Bannerlord.exe -force-d3d11` or `-force-vulkan`
- Set Windows version: `winecfg` → set to Windows 10
**Missing DLLs:**
- Install DirectX runtime: `winetricks d3dx9 d3dx10 d3dx11 vcrun2019`
**Performance:**
- GPTK/Rosetta overhead is expected; 30-60 FPS is normal on M1/M2
- Lower in-game graphics settings to "Medium" for first run
**Installer won't chain .bin files:**
- Make sure all .bin files are in the same directory as the .exe
- Verify with: `ls -la ~/Downloads/setup_mount__blade_ii_bannerlord_*`
## References
- GamePortal Protocol: `GAMEPORTAL_PROTOCOL.md`
- Portal config: `portals.json` (entry: "bannerlord")
- GOG App ID: Mount & Blade II: Bannerlord
- Steam App ID: 261550 (for Steam stats integration)

View File

@@ -1,115 +0,0 @@
#!/usr/bin/env bash
# Bannerlord Launcher for macOS (Apple Silicon via Wine/GPTK)
# Usage: ./portal/bannerlord/launch.sh [--wine-prefix PATH] [--exe PATH]
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
# Defaults — override with flags or environment
WINEPREFIX="${WINEPREFIX:-$HOME/Games/Bannerlord}"
BANNERLORD_EXE=""
WINE_CMD=""
# Parse args
while [[ $# -gt 0 ]]; do
case "$1" in
--wine-prefix) WINEPREFIX="$2"; shift 2 ;;
--exe) BANNERLORD_EXE="$2"; shift 2 ;;
--help)
echo "Usage: $0 [--wine-prefix PATH] [--exe PATH]"
echo ""
echo "Defaults:"
echo " Wine prefix: $WINEPREFIX"
echo " Auto-discovers Bannerlord.exe in the prefix"
exit 0
;;
*) echo "Unknown arg: $1"; exit 1 ;;
esac
done
# Find wine command
find_wine() {
if command -v wine64 &>/dev/null; then
echo "wine64"
elif command -v wine &>/dev/null; then
echo "wine"
elif [ -f "/Applications/Whisky.app/Contents/Resources/WhiskyCmd" ]; then
echo "/Applications/Whisky.app/Contents/Resources/WhiskyCmd"
else
echo ""
fi
}
WINE_CMD="$(find_wine)"
if [ -z "$WINE_CMD" ]; then
echo "ERROR: No Wine runtime found."
echo "Install one of:"
echo " brew install --cask porting-kit"
echo " brew install --cask crossover"
echo " brew tap apple/apple && brew install game-porting-toolkit"
exit 1
fi
echo "Wine runtime: $WINE_CMD"
echo "Wine prefix: $WINEPREFIX"
# Find Bannerlord.exe if not specified
if [ -z "$BANNERLORD_EXE" ]; then
# Search common GOG install paths
SEARCH_PATHS=(
"$WINEPREFIX/drive_c/GOG Games/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe"
"$WINEPREFIX/drive_c/GOG Games/Mount Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe"
"$WINEPREFIX/drive_c/Program Files/Mount & Blade II Bannerlord/bin/Win64_Shipping_Client/Bannerlord.exe"
)
# Also search PortingKit prefixes
while IFS= read -r -d '' exe; do
SEARCH_PATHS+=("$exe")
done < <(find "$HOME/Library/Application Support/PortingKit" -name "Bannerlord.exe" -print0 2>/dev/null || true)
for path in "${SEARCH_PATHS[@]}"; do
if [ -f "$path" ]; then
BANNERLORD_EXE="$path"
break
fi
done
fi
if [ -z "$BANNERLORD_EXE" ] || [ ! -f "$BANNERLORD_EXE" ]; then
echo "ERROR: Bannerlord.exe not found."
echo "Searched:"
echo " $WINEPREFIX/drive_c/GOG Games/"
echo " ~/Library/Application Support/PortingKit/"
echo ""
echo "Run the install first. See: portal/bannerlord/INSTALL.md"
exit 1
fi
echo "Game binary: $BANNERLORD_EXE"
echo "Launching..."
echo ""
# Log the launch for proof
LAUNCH_LOG="$SCRIPT_DIR/proof/launch_$(date +%Y%m%d_%H%M%S).log"
mkdir -p "$SCRIPT_DIR/proof"
{
echo "=== Bannerlord Launch ==="
echo "Date: $(date -Iseconds)"
echo "Wine: $WINE_CMD"
echo "Prefix: $WINEPREFIX"
echo "Binary: $BANNERLORD_EXE"
echo "User: $(whoami)"
echo "macOS: $(sw_vers -productVersion)"
echo "Arch: $(uname -m)"
echo "========================="
} > "$LAUNCH_LOG"
echo "Launch log: $LAUNCH_LOG"
echo ""
# Set the prefix and launch
export WINEPREFIX
EXE_DIR="$(dirname "$BANNERLORD_EXE")"
cd "$EXE_DIR"
exec "$WINE_CMD" "Bannerlord.exe" "$@"

View File

@@ -1,16 +0,0 @@
# Bannerlord Proof
Screenshots and launch logs proving the game runs locally on the Mac.
## How to capture proof
1. Launch the game: `./portal/bannerlord/launch.sh`
2. Wait for main menu to render
3. Take screenshot: `screencapture -x portal/bannerlord/proof/main_menu_$(date +%Y%m%d).png`
4. Save launch log (auto-generated by launch.sh)
## Expected proof files
- `main_menu_*.png` — screenshot of game main menu
- `launch_*.log` — launch command + environment details
- `ingame_*.png` — optional in-game screenshots

View File

@@ -23,21 +23,18 @@
"rotation": { "y": 0.5 },
"portal_type": "game-world",
"world_category": "strategy-rpg",
"environment": "local",
"environment": "production",
"access_mode": "operator",
"readiness_state": "active",
"telemetry_source": "local-desktop:bannerlord",
"telemetry_source": "hermes-harness:bannerlord",
"owner": "Timmy",
"app_id": 261550,
"window_title": "Mount & Blade II: Bannerlord",
"install_source": "gog",
"gog_version": "1.3.15.109797",
"launcher_script": "portal/bannerlord/launch.sh",
"install_guide": "portal/bannerlord/INSTALL.md",
"destination": {
"type": "local-launch",
"url": "https://bannerlord.timmy.foundation",
"type": "harness",
"action_label": "Enter Calradia",
"params": { "world": "calradia", "runtime": "wine/gptk" }
"params": { "world": "calradia" }
}
},
{

View File

@@ -200,6 +200,61 @@ canvas#nexus-canvas {
box-shadow: 0 0 20px var(--color-primary);
}
/* === TOOLTIP SYSTEM === */
/* Any element with data-tooltip gets a hover tooltip label */
[data-tooltip] {
position: relative;
}
[data-tooltip]::after {
content: attr(data-tooltip);
position: absolute;
right: calc(100% + 10px);
top: 50%;
transform: translateY(-50%);
background: rgba(5, 5, 16, 0.95);
color: var(--color-primary);
font-family: var(--font-body);
font-size: 11px;
letter-spacing: 0.05em;
padding: 4px 10px;
border: 1px solid var(--color-primary-dim);
border-radius: 4px;
white-space: nowrap;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s ease;
backdrop-filter: blur(8px);
box-shadow: 0 0 12px rgba(74, 240, 192, 0.15);
z-index: 100;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
opacity: 1;
}
/* For elements positioned on the right side, tooltip appears to the left */
.hud-top-right [data-tooltip]::after {
right: calc(100% + 10px);
}
/* For inline/badge elements where right-side tooltip might clip */
.hud-status-item[data-tooltip]::after {
right: auto;
left: calc(100% + 10px);
}
/* Focus-visible ring for keyboard navigation */
.hud-icon-btn:focus-visible,
.hud-status-item:focus-visible,
.atlas-close-btn:focus-visible,
.vision-close-btn:focus-visible,
.portal-close-btn:focus-visible,
.memory-panel-close:focus-visible,
.memory-panel-pin:focus-visible,
.session-room-close:focus-visible {
outline: 2px solid var(--color-primary);
outline-offset: 2px;
box-shadow: 0 0 16px rgba(74, 240, 192, 0.4);
}
.hud-status-item {
display: flex;
align-items: center;