[Bug] aria-hidden element with focusable descendants breaks the accessibility tree on API reference pages (+ heading order & default-theme contrast) #6246
morguama
started this conversation in
Bugs & Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Theme: prism · Layout: sidenav
Where: OpenAPI-generated API reference pages (e.g. /api-reference/permits/search-permits), desktop + mobile — identical results.
aria-hidden="true" contains focusable descendants → malformed accessibility tree. The data-agent-docs-index element (blockquote.sr-only) is set aria-hidden="true" but contains focusable descendants. Lighthouse flags this both as an Accessibility failure and as "Accessibility tree is not well-formed" (the Agentic Browsing / AI-readability audit). Fixing this one issue resolves both. Expected: remove focusable descendants from the aria-hidden subtree, or don't apply aria-hidden to a container holding focusable content.
Heading order skips levels. API section headings render as
<h4 class="api-section-heading-title">with no preceding<h2>/<h3>, so heading order skips levels. Expected: a proper heading hierarchy in the OpenAPI template.Insufficient color contrast on default theme chrome (lower priority). The search bar (#search-bar-entry), AI-assistant button (#assistant-entry), and the green GET method pill (#2AB673) fail WCAG AA against their backgrounds. These aren't exposed in mint.json, so site owners can't fix them.
Impact: Accessibility 92 and Agentic Browsing 67 on pages that otherwise score ~100 on Performance/Best Practices/SEO. The agentic/AI-readability score is especially relevant since coding agents are primary consumers of API docs.
Audit: Chrome DevTools + Lighthouse, desktop + mobile.
Beta Was this translation helpful? Give feedback.
All reactions