Replies: 1 comment
Placeholder text isn't intended to show what default something has. Assuming it did (and the field correctly adjusted in size to display a large placeholder) users would likely want to copy it (they can't) or see it while they're overriding it (they can't). So from a UX standpoint I'd argue against using placeholder text on SEO title and meta description. The arbiter of truth is always the generated HTML source and that's what people should ultimately be checking against. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The problem
The SEO panel gives no indication that its fields are optional overrides, so an empty panel reads as "this page has no SEO".
getSeoMetaalready derives sensible values when the panel is empty:Nothing in the admin surfaces that. On a site I maintain, all 21 pages have a completely blank SEO panel and every one of them emits a correct, page-specific title, description and canonical. The editor had no way to know that, and the reasonable reading of four empty boxes is that something is unset or broken. The two ways that goes wrong are retyping the page title into the SEO title, which duplicates content for no benefit and then silently goes stale when the page title changes, or assuming the site has no SEO at all.
Proposal
Show the value that will actually be used as placeholder text on SEO Title and Meta Description.
SeoPaneltakes two optional props,defaultTitleanddefaultDescription, matching the vocabularygetSeoMetaalready uses for the same concept, and renders them as placeholders.ContentSettingsPanelpassesdata.titleanddata.excerpt, so the placeholder shows what will really be emitted rather than a generic hint. When there is nothing to derive from, no placeholder is rendered.No change to generated meta, and no new translatable strings.
Notes
I have this implemented and passing typecheck, lint and the full admin suite locally, with two tests covering the placeholder appearing and being omitted. Happy to open the PR if this seems like a direction you would take.
One thing worth flagging: it will change the admin visual regression baselines, since the panel renders placeholder text where it previously rendered empty inputs.
All reactions