feat: add meta titles to all page routes for accessibility#2212
feat: add meta titles to all page routes for accessibility#2212
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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
appendToMetaTitlehelper 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 fromgetLocationKitsor 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.
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:
Update ESLint rule require-meta-export-in-routes:
All titles use appendToMetaTitle helper for consistent formatting and follow descriptive naming based on route functionality.