Skip to content

fix(feature-list): render a framework without an API reference as a non-link - #451

Merged
moritzhartmeier merged 2 commits into
mainfrom
fix/featurelist-missing-api-url
Oct 9, 2026
Merged

moritzhartmeier merged 2 commits into
mainfrom
fix/featurelist-missing-api-url

Conversation

@eugenia-scandit

Copy link
Copy Markdown
Collaborator

Split out of #418, which is being closed. This was the one change there that stands on its own.

The bug

In the non-compact table view, a framework cell with no apiUrl rendered an <a> with no href. withCurrentDocsPath(undefined) returns undefined, React drops the attribute, and the chip stays a link that:

  • can't be focused with the keyboard
  • navigates nowhere
  • still shows the link hover

16 cells in features.json reach this branch. 17 have no apiUrl; the 17th, Web / 7-Segment Display, is filtered out earlier by version === "n/a".

The change

  • index.tsx: a missing apiUrl now renders a <span> rather than an <a>, the same pattern the feature-name cell uses (<a> becomes <h4>). It has aria-disabled, a title, and a visually hidden "(not available)" so screen readers can tell it apart.
  • styles.module.css:
    • The unavailable state uses a dashed border and --ifm-color-emphasis-700 instead of opacity: 0.5. The opacity version composited to 3.19:1 in light mode, below AA; the new colours measure 5.29:1 light and 12.26:1 dark.
    • The hover rule no longer switches the chip back to full-contrast colour.
    • .frameworkList changes from display: none to a wrapping flex row, so the column shows its content under its own header.

Scope

Latent today: all 50 <FeatureList> usages pass displayMode="compact", which skips this column. Whether the non-compact view should exist at all was raised in #418's review and is out of scope here.

Verified

  • tsc --noEmit is clean.
  • The full build passes.
  • verify:frameworks passes.

The 16/17 and 50 counts were rechecked against current main.

Merge note

This touches the same href line as #447, which changes withCurrentDocsPath(...) to apiReferenceUrl(..., activeVersionName). Whichever merges second has a one-line conflict: keep the <a>/<span> split from here and the apiReferenceUrl call from #447.

🤖 Generated with Claude Code

…on-link

A framework cell with no apiUrl rendered an <a> with no href:
withCurrentDocsPath returns undefined, React omits the attribute, and the
chip stayed a link that is not keyboard-focusable, navigates nowhere and
still shows the link hover. 16 cells in features.json reach that branch.

It now renders a <span> with a dashed border, a dimmed colour token that
keeps AA contrast (the old opacity rule composited to 3.19:1), and a
visually hidden "(not available)" so screen readers get the same signal.
The framework column's container, which was display: none, gets a minimal
wrapping layout so the chips are legible.

Latent today: all 50 FeatureList usages pass displayMode="compact", which
skips this column. Split out of #418, which is being closed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-09 13:58 UTC

Comment thread src/components/FeatureList/index.tsx Outdated
Comment thread src/components/FeatureList/index.tsx Outdated
Comment thread src/components/FeatureList/index.tsx Outdated
- The hidden text says "(no API reference)" instead of "(not available)":
  every chip in this column is a framework that supports the feature.
- Drop aria-disabled: a plain span is not a control, and ARIA 1.2 does
  not allow the attribute on generic elements.
- Shorten the title to "No API reference" so screen readers don't
  announce the name and version twice.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@moritzhartmeier
moritzhartmeier merged commit 3fffdc5 into main Oct 9, 2026
5 checks passed
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