Skip to content

feat: add meta titles to all page routes for accessibility#2212

Merged
DonKoko merged 2 commits intomainfrom
2205-feat-implement-titles-in-each-route
Nov 26, 2025
Merged

feat: add meta titles to all page routes for accessibility#2212
DonKoko merged 2 commits intomainfrom
2205-feat-implement-titles-in-each-route

Conversation

@DonKoko
Copy link
Copy Markdown
Contributor

@DonKoko DonKoko commented Nov 26, 2025

Add descriptive page titles to 68 route files using the meta export pattern. This improves SEO and accessibility by ensuring every page has a meaningful title displayed in the browser tab and read by screen readers.

Changes:

  • Add meta exports to auth routes (authentication, invites, OAuth, OTP)
  • Add meta exports to account management routes (settings, workspaces)
  • Add meta exports to admin dashboard routes (users, announcements, organizations, updates, QR codes)
  • Add meta exports to asset management routes (bookings, custody, locations)
  • Add meta exports to kit management routes
  • Add meta exports to location and team settings routes
  • Add meta exports to QR and barcode routes

Update ESLint rule require-meta-export-in-routes:

  • Only trigger for routes with default exports (page components)
  • Accept both 'export const meta' and 'export function meta' syntax
  • Skip resource routes (API endpoints without UI components)

All titles use appendToMetaTitle helper for consistent formatting and follow descriptive naming based on route functionality.

Add descriptive page titles to 68 route files using the meta export
pattern. This improves SEO and accessibility by ensuring every page has
a meaningful title displayed in the browser tab and read by screen
readers.

Changes:
- Add meta exports to auth routes (authentication, invites, OAuth, OTP)
- Add meta exports to account management routes (settings, workspaces)
- Add meta exports to admin dashboard routes (users, announcements,
  organizations, updates, QR codes)
- Add meta exports to asset management routes (bookings, custody,
  locations)
- Add meta exports to kit management routes
- Add meta exports to location and team settings routes
- Add meta exports to QR and barcode routes

Update ESLint rule require-meta-export-in-routes:
- Only trigger for routes with default exports (page components)
- Accept both 'export const meta' and 'export function meta' syntax
- Skip resource routes (API endpoints without UI components)

All titles use appendToMetaTitle helper for consistent formatting and
follow descriptive naming based on route functionality.
@DonKoko DonKoko linked an issue Nov 26, 2025 that may be closed by this pull request
@vercel
Copy link
Copy Markdown

vercel bot commented Nov 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
shelf-docs Ready Ready Preview Comment Nov 26, 2025 3:43pm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds descriptive page titles to 68 route files to improve SEO and accessibility. The changes ensure every page has a meaningful title displayed in the browser tab and read by screen readers. The ESLint rule require-meta-export-in-routes is updated to only enforce meta exports on routes with default exports (page components) and to accept both export const meta and export function meta syntax patterns.

Key changes:

  • Updated ESLint rule to only trigger for routes with default exports and accept both meta export syntax patterns
  • Added meta exports across authentication, admin dashboard, asset management, booking, kit, and location routes
  • All titles use the appendToMetaTitle helper for consistent "| shelf.nu" suffix formatting

Reviewed changes

Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
eslint-local-rules/require-meta-export-in-routes.cjs Updated rule logic to check for default exports and support both const and function meta exports
eslint-local-rules.cjs Enabled the require-meta-export-in-routes rule
.eslintrc Uncommented and enabled the meta export rule as a warning
app/routes/qr+/*.tsx Added meta exports for QR code routes
app/routes/barcode+/$value.tsx Added meta export for barcode route
app/routes/_welcome+/_layout.tsx Added meta export for welcome/onboarding layout
app/routes/_layout+/settings.team*.tsx Added meta exports for team settings routes
app/routes/_layout+/me.*.tsx Added meta exports for user's personal asset/booking routes
app/routes/_layout+/locations*.tsx Added meta exports for location management routes
app/routes/_layout+/kits*.tsx Added meta exports for kit management routes
app/routes/_layout+/bookings*.tsx Added meta exports for booking management routes
app/routes/_layout+/assets*.tsx Added meta exports for asset management routes
app/routes/_layout+/admin-dashboard+/*.tsx Added meta exports for admin dashboard routes
app/routes/_layout+/account-details*.tsx Added meta exports for workspace/account routes
app/routes/_index.tsx Added meta export for home/index route
app/routes/_auth+/*.tsx Added meta exports for authentication routes
Comments suppressed due to low confidence (1)

app/routes/_layout+/locations.$locationId.kits.tsx:80

  • The header title uses locationId (which appears to be a raw ID string) instead of the actual location name. This will display something like 'Kits in abc123' instead of 'Kits in Warehouse A'. The location name should be fetched from the database and used here to provide a meaningful page title. Consider querying the location name from getLocationKits or making a separate query.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment thread app/routes/_layout+/me.bookings.tsx
Comment thread app/routes/_layout+/settings.team.nrm.$nrmId.edit.tsx
Comment thread app/routes/_auth+/oauth.callback.tsx
@DonKoko DonKoko merged commit 521757e into main Nov 26, 2025
13 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.

feat: implement titles in each route

2 participants