fix: web/ quick wins — CSS cleanup, ARIA tabs, and file header comments
CSS: - Remove duplicate li::before block in app-search.css - Fix typo: search-reuslt → search-result in app-search.css - Remove commented-out CSS rules in app-flash.css - Add descriptive header comment to all 27 CSS component files JS: - Complete WAI-ARIA Tabs pattern: generate IDs, add aria-controls on tab buttons and aria-labelledby on tab panels (app-tabs.js) - Add JSDoc header comments to ~33 JS files (core + components) - Add explanatory block comment to app-boot.js (why classic IIFE) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Promise-based confirm dialog controller with variant inference, focus trap, and native fallback.
|
||||
*/
|
||||
import { warnOnce } from './app-dom.js';
|
||||
|
||||
const VARIANTS = new Set(['default', 'warning', 'danger']);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Factory for standard detail pages — form dirty-tracking, unsaved indicator, validation routing, and keyboard save.
|
||||
*/
|
||||
import { initDetailActionPolicy } from './app-details-action-policy.js';
|
||||
import { confirmDialog } from './app-confirm-dialog.js';
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Form submit policy for detail pages — confirm dialogs, double-submit prevention, and aria-busy.
|
||||
*/
|
||||
import { confirmDialog, requestSubmitWithFallback } from './app-confirm-dialog.js';
|
||||
|
||||
const escapeAttr = (value) => {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Persists open/closed state of details elements to localStorage by key.
|
||||
*/
|
||||
const toElement = (value) => {
|
||||
if (value instanceof HTMLElement) {
|
||||
return value;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* DOM utility helpers — safe element lookup with missing-element warnings and telemetry.
|
||||
*/
|
||||
import { telemetry } from './app-telemetry.js';
|
||||
|
||||
const warned = new Set();
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Reads JSON configuration embedded in the page via script#page-config-{id} elements.
|
||||
*/
|
||||
import { warnOnce } from './app-dom.js';
|
||||
|
||||
export function readPageConfig(configId, root = document) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* Frontend event telemetry — captures UI events with deduplication, sampling, and rate limiting.
|
||||
*/
|
||||
const DEFAULT_SAMPLE_RATE = 0.2;
|
||||
const DEFAULT_DEDUPE_TTL_MS = 5 * 60 * 1000;
|
||||
const DEFAULT_MAX_EVENTS_PER_MINUTE = 20;
|
||||
|
||||
Reference in New Issue
Block a user