Skip to content

No more href to '#' for reasons#466

Merged
thehabes merged 5 commits intomainfrom
462-hrefs
Feb 13, 2026
Merged

No more href to '#' for reasons#466
thehabes merged 5 commits intomainfrom
462-hrefs

Conversation

@thehabes
Copy link
Copy Markdown
Member

@thehabes thehabes commented Feb 12, 2026

Closes #462

Encountered #467

Summary

Eliminates 12 instances of href="#" across the codebase to prevent the # character from polluting the browser URL and history. If a href is ever set it is a <a>. If a href is never set, it is a <button>.

Approach

  • Navigation links (manage-project, project): Removed href="#", added tabindex="0" for keyboard accessibility. JS sets real href after project loads.
  • Action elements (logout, TPEN 2.8 import, edit title, open project): Converted from <a href="#"> to <button> with CSS resets to match existing styling.
  • Loading placeholder (list-navigation): Converted non-interactive <a href="#">Loading...</a> to <span>.
  • Focus indicators: Added focus-visible styles to Card component slotted <a> and <button> elements for keyboard navigation visibility.

Files Changed

  • interfaces/manage-project/index.html — 6 card footer links
  • interfaces/project/index.html — leave project link
  • components/gui/site/Header.js + header.css — logout button
  • components/new-action.js — TPEN 2.8 import button
  • components/project-details/index.js — edit title button
  • components/projects/list-navigation.js — loading placeholder
  • interfaces/import-tpen28/index.html — open project button
  • components/gui/card/Card.js — focus-visible styles

Testing

  • Verified no href="#" remains in codebase
  • Keyboard Tab navigation reaches all interactive elements
  • Focus indicators visible on card footer links and buttons
  • Enter is actionable on focused links and buttons
  • Logout, TPEN 2.8 import, and edit title actions function correctly

Note

Now buttons look a little different here..
image

This occurs in other places where we made such changes, like in /annotator and /manage-columns.

This will help set the stage for #465 where we would have to look at all of those and think about it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 12, 2026

This comment was marked as resolved.

@thehabes thehabes marked this pull request as ready for review February 12, 2026 21:51
@thehabes thehabes requested a review from cubap February 12, 2026 21:51
@thehabes thehabes self-assigned this Feb 12, 2026
Copy link
Copy Markdown
Member

@cubap cubap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yesyes

@thehabes thehabes merged commit e58fb31 into main Feb 13, 2026
4 checks passed
@thehabes thehabes deleted the 462-hrefs branch February 18, 2026 14:59
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.

Remove All Instances of href="#"

3 participants