Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure an accessible default viewport meta tag #10823

Merged
merged 4 commits into from Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/next/next-server/lib/head.tsx
Expand Up @@ -11,12 +11,7 @@ type WithInAmpMode = {
export function defaultHead(inAmpMode = false) {
const head = [<meta charSet="utf-8" />]
if (!inAmpMode) {
head.push(
<meta
name="viewport"
content="width=device-width,minimum-scale=1,initial-scale=1"
/>
)
head.push(<meta name="viewport" content="width=device-width" />)
}
return head
}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/client-navigation/test/rendering.js
Expand Up @@ -52,7 +52,7 @@ export default function(render, fetch) {
test('header renders default viewport', async () => {
const html = await render('/default-head')
expect(html).toContain(
'<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"/>'
'<meta name="viewport" content="width=device-width"/>'
)
})

Expand Down