octopusthink / ghost-ship

A Gatsby starter template for websites & blogs. Designed for accessibility and SEO-friendliness.
MIT License
2 stars 0 forks source link

Ensure pages don't output empty <h1>s #28

Open sarahmonster opened 4 years ago

sarahmonster commented 4 years ago

All pages are currently outputting empty <h1> tags:

Screenshot 2019-12-28 at 23 10 35

Not great for accessibility! It looks like we're passing a bunch of data to the PageHeader component, but the component has been simplified to only show children as a prop.

So instead of: <PageHeader pageTitle={title} summary={summary} description={description} /> the fix would be to use: <PageHeader>{title}</PageHeader>

Alternatively, we could refine the PageHeader component to accept more props. This tends to be a common pattern I use for sites, so I'm tempted to opt for the latter approach, although I'm happy to hear dissenting opinions. @tofumatt, thoughts?