Skip to content

[TAN-7695] Legacy ProjectCard and ProjectFolderCard a11y improvements#13797

Open
AchrafGoVocal wants to merge 22 commits into
masterfrom
TAN-7695-legacy-project-folder-card-focus-trap
Open

[TAN-7695] Legacy ProjectCard and ProjectFolderCard a11y improvements#13797
AchrafGoVocal wants to merge 22 commits into
masterfrom
TAN-7695-legacy-project-folder-card-focus-trap

Conversation

@AchrafGoVocal
Copy link
Copy Markdown
Contributor

@AchrafGoVocal AchrafGoVocal commented May 6, 2026

Summary

Both card components wrapped their entire body in an and rendered a (CTA) inside it. Nested interactive elements are invalid HTML and caused a focus trap in Firefox/Safari — forward Tab cycled between the card and its inner button without progressing. This PR removes the nesting and improves screen-reader context.

  • Container is now a <div>. Whole-card click target preserved via a ::before overlay on the title link (single tab stop per card).
  • Title <h3> wrapped in ProjectTitleLink / FolderTitleLink — the single primary link.
  • CTA <button> → CTA <Link> at z-index: 2, independently focusable above the overlay.
  • DOM order: title now precedes CTA in tab/SR order (CTA used to be announced first without project context). order: -1 on ContentHeader keeps the visual layout. ProjectCard only; ProjectFolderCard has no CTA.
  • aria-describedby on the title link references description and participants count, so SR users hear "title → description → X participants".
  • aria-label on the CTA includes the project title (uniquely identifies CTAs across multiple cards).
  • New joinAriaIds util in utils/a11y for cleanly composing IDREFS values.
  • Removed redundant ScreenReaderOnly duplicate title/description and aria-hidden on ContentBody — both were workarounds for the now-removed wrapping <a>.

Changelog

Changed

  • [TAN-7595] Improve screen reader experience when going through the legacy "Projects and Folders" homepage widget.

Fixed

  • [TAN-7595] Fixed ProjectCard and ProjectFolderCard focus trap when CSS is disabled

For translators

"app.components.ProjectCard.a11y_ctaForProject": "{cta}. Project {projectTitle}",
This translation is for screen readers to be able to differentiate between the CTAs on in each project card.
For example: Vote. Project Title of project

@notion-workspace
Copy link
Copy Markdown

@cl-dev-bot
Copy link
Copy Markdown
Collaborator

cl-dev-bot commented May 6, 2026

Messages
📖 Changelog provided 🎉
📖 Notion issue: TAN-7695
📖

Run the e2e tests

📖 Check translation progress

Generated by 🚫 dangerJS against 91fefe0

@AchrafGoVocal AchrafGoVocal requested a review from EdwinKato May 6, 2026 15:02
@AchrafGoVocal AchrafGoVocal marked this pull request as ready for review May 6, 2026 15:02
@EdwinKato
Copy link
Copy Markdown
Contributor

Been swamped, hadn't gotten to this yet. Okay if I review this on Wednesday morning? I'm off tomorrow. if urgent, I can review retrospectively after merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants