Skip to content

Conversation

@nimrodkra
Copy link
Member

@nimrodkra nimrodkra commented Jan 10, 2026

Summary

  • Fixed Google Search Console error: "Either name or item.name should be specified (in itemListElement)"
  • Added fallback chain for the breadcrumb name property when post.title is undefined
  • Removed item property from last breadcrumb per Google's recommendation (not required for the final item)

Test plan

  • Verify breadcrumb JSON-LD output includes name for all three items
  • Validate with Google's Rich Results Test tool

Preview domain

https://fix-breadcrumb-seo-missing-name.preview.app.daily.dev

Google Search Console reported "Either name or item.name should be specified"
for the last breadcrumb item. This occurred because post.title can be undefined,
and JSON.stringify omits undefined values.

Added fallback chain (post.title || post.sharedPost?.title || 'Post') and
removed item property from last breadcrumb per Google's recommendation.
@vercel
Copy link

vercel bot commented Jan 10, 2026

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

Project Deployment Review Updated (UTC)
daily-webapp Ready Ready Preview Jan 10, 2026 0:44am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
storybook Ignored Ignored Jan 10, 2026 0:44am

@nimrodkra nimrodkra requested a review from idoshamun January 10, 2026 12:40
@nimrodkra
Copy link
Member Author

@claude review this pr

@claude
Copy link
Contributor

claude bot commented Jan 10, 2026

Claude finished @nimrodkra's task in 40s —— View job


PR Review

Tasks

  • Read and analyze the changed file
  • Review the breadcrumb schema implementation
  • Provide comprehensive feedback

Summary

This PR successfully addresses the Google Search Console SEO validation error by adding a fallback chain for the breadcrumb name property and removing the unnecessary item property from the last breadcrumb element.

Changes Review

Line 152: Added fallback chain for breadcrumb name

name: post.title || post.sharedPost?.title || 'Post',

Strengths:

  • Correctly fixes the validation error: The fallback chain ensures the name property is always defined, preventing the "Either name or item.name should be specified" error
  • Consistent with existing patterns: Uses the same fallback pattern as getSeoDescription() (line 25) in the same file
  • Handles shared posts: Includes post.sharedPost?.title which is important for reposted content
  • Graceful degradation: Falls back to generic 'Post' if neither title is available

Removing the item property (line 153)

  • Correct per schema.org spec: According to Google's documentation, the item property is optional for the last breadcrumb element (since there's nowhere to navigate to)
  • Cleaner output: Removes unnecessary data from the JSON-LD

Additional Observations

No issues found - the implementation is solid and follows best practices:

  1. Type safety: The optional chaining (post.sharedPost?.title) properly handles potentially undefined values

  2. SEO completeness: All three breadcrumb items now have guaranteed name values:

    • Position 1: 'Home' (hardcoded)
    • Position 2: post.source?.name || 'Posts' (already had fallback)
    • Position 3: post.title || post.sharedPost?.title || 'Post' (now has fallback)
  3. Testing verification: The PR description indicates testing with Google's Rich Results Test tool ✓

Recommendation

✅ Approve - This is a clean, minimal fix that directly addresses the SEO validation error without over-engineering. The change is well-tested and follows existing code patterns in the file.


@nimrodkra nimrodkra merged commit 995619f into main Jan 10, 2026
13 checks passed
@nimrodkra nimrodkra deleted the fix/breadcrumb-seo-missing-name branch January 10, 2026 12:48
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.

4 participants