Make accesibility score 100 in Lighthouse
While we could fetch the lang attribute data from the gatsby config file, it's probably better to couple those with the particular page's Helmet as if we have a different language (i18n) we would need to be able to define that too.
This commit is contained in:
parent
4a3683b9e2
commit
ca3b074d29
2 changed files with 5 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ class BlogIndex extends React.Component {
|
|||
|
||||
return (
|
||||
<Layout location={this.props.location}>
|
||||
<Helmet title={siteTitle} />
|
||||
<Helmet title={siteTitle} htmlAttributes={{ lang: 'en' }} />
|
||||
<Bio />
|
||||
{posts.map(({ node }) => {
|
||||
const title = get(node, 'frontmatter.title') || node.fields.slug
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ class BlogPostTemplate extends React.Component {
|
|||
|
||||
return (
|
||||
<Layout location={this.props.location}>
|
||||
<Helmet title={`${post.frontmatter.title} | ${siteTitle}`} />
|
||||
<Helmet
|
||||
title={`${post.frontmatter.title} | ${siteTitle}`}
|
||||
htmlAttributes={{ lang: 'en' }}
|
||||
/>
|
||||
<h1>{post.frontmatter.title}</h1>
|
||||
<p
|
||||
style={{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue