Fix SX nav morphing, retry error modal, and aria-selected CSS extraction

- Re-read verb URL from element attributes at execution time so morphed
  nav links navigate to the correct destination
- Reset retry backoff on fresh requests; skip error modal when sx-retry
  handles the failure
- Strip attribute selectors in CSS registry so aria-selected:* classes
  resolve correctly for on-demand CSS
- Add @css annotations for dynamic aria-selected variant classes
- Add SX docs integration test suite (102 tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 20:37:17 +00:00
parent f551fc7453
commit 03f0929fdf
5 changed files with 457 additions and 1 deletions

View File

@@ -1685,9 +1685,17 @@
// ---- Request executor -------------------------------------------------
function executeRequest(el, verbInfo, extraParams) {
// Re-read verb from element in case attributes were morphed since binding
var currentVerb = getVerb(el);
if (currentVerb) verbInfo = currentVerb;
var method = verbInfo.method;
var url = verbInfo.url;
// Reset retry backoff on fresh (non-retry) requests
if (!el.classList.contains("sx-error")) {
el.removeAttribute("data-sx-retry-ms");
}
// sx-media: skip if media query doesn't match
var media = el.getAttribute("sx-media");
if (media && !window.matchMedia(media).matches) return Promise.resolve();