This repository has been archived by the owner on Jul 30, 2019. It is now read-only.
Tweak viewport meta warning #607
Merged
stevefaulkner
merged 1 commit into
w3c:master
from
patrickhlauke:viewport-meta-warning-fix
Oct 4, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -823,9 +823,11 @@ | |
|
||
<div class="warning"> | ||
|
||
<p>Developers should not use the <code>user-scalable=no</code> or <code>maximum-scale=1.0</code> | ||
values in the <code>content</code> attribute as their use hinders users' ability to zoom the | ||
content to a size that is legible for their needs.</p> | ||
<p><a href="https://www.w3.org/TR/css-device-adapt-1/#viewport-meta"><code><meta name="viewport" content="..."></code></a> | ||
allows authors to define specific viewport characteristics (such as the layout viewport's width and zoom factor) | ||
for their documents. Among these is the ability to prevent or restrict users from being able to zoom, using | ||
<code>content</code> values such as <code>user-scalable=no</code> or <code>maximum-scale=1.0</code>. Authors should not suppress | ||
or limit the ability of users to resize a document, as this causes accessibility and usability issues.</p> | ||
|
||
<div class="example"> | ||
The following examples illustrate code that should be avoided: | ||
|
@@ -839,11 +841,13 @@ | |
</pre> | ||
</div> | ||
|
||
<p>The use of these values could be appropriate in specific use cases, for example in a map application where | ||
zooming is handled via scripting or for a game application where a fixed viewport is required. | ||
In general however, their use will not be appropriate and HTML conformance checking tools should | ||
display a warning if developers use these values.</p> | ||
|
||
<p>There may be specific use cases where preventing users from zooming may be appropriate, such as map applications – | ||
where custom zoom functionality is handled via scripting. | ||
However, in general this practice should be avoided, and HTML conformance checking tools should display a warning if | ||
they encounter these values.</p> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I said before. Design for a fixed viewport is too broad a statement IMHO. Where there is a zoom mechanism, handled by the application - as in the map example - there is a clear use case. Can you explain the game case more clearly? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dropped that bit, as i agree. it's not EASY, but games CAN be made to work when zoomed |
||
<p>Note that most user agents now allow users to always zoom, regardless of any | ||
<code><meta name="viewport" content="..."></code> restrictions – either by default, or as a setting/option (which may however not be immediately apparent to users).</p> | ||
</div> | ||
|
||
If a <{meta}> element has a <dfn element-attr for="meta"><code>name</code></dfn> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This deletion removes the normative "should not" needs to be worked into updated prose.