Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Tweak viewport meta warning #607

Merged
merged 1 commit into from Oct 4, 2016
Merged

Tweak viewport meta warning #607

merged 1 commit into from Oct 4, 2016

Conversation

patrickhlauke
Copy link
Member

  • introduce the actual name="viewport" meta, as this only applies in
    this specific case
  • link to CSS device adaptation, currently still the only "official"
    (non-Apple) doc where this is documented
  • expand/rewrite advice
  • include note about UAs ignoring these values (either with an opt-in
    setting or outright)

<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>&lt;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>. Suppressing or limiting the ability of users to resize a document is an accessibility and usability issue, and should be avoided.</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put in some line breaks please :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh...fair enough ;)

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) or games (designed specifically for a fixed viewport). However, in general this practice should be avoided, and HTML conformance checking tools should display a warning if they encounter these values.</p>

Copy link
Collaborator

Choose a reason for hiding this comment

The 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?

Copy link
Member Author

Choose a reason for hiding this comment

The 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

@chaals
Copy link
Collaborator

chaals commented Oct 4, 2016

I also fixed the IPR thing.

@patrickhlauke
Copy link
Member Author

force-pushed a new version with the fixes, @chaals

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>. Suppressing
or limiting the ability of users to resize a document is an accessibility and usability issue, and should be avoided.</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. s/is an accessibility/causes accessibility/ ...


<p>Note that most user agents now include options/settings that allow users to always zoom, regardless of any
<code>&lt;meta name="viewport" content="..."></code> restrictions, and certain browsers have already started to
simply ignore these values altogether.</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could simplify this: Note that most user agents allow users to zoom, regardless of ... However this sometimes involves configuration settings that some users may not find.

Copy link
Collaborator

@chaals chaals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More kibbitzing editorial stuff...

@@ -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>
Copy link
Contributor

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.

- introduce the actual name="viewport" meta, as this only applies in
this specific case
- link to CSS device adaptation, currently still the only "official"
(non-Apple) doc where this is documented
- expand/rewrite advice
- include note about UAs ignoring these values (either with an opt-in
setting or outright)
@patrickhlauke
Copy link
Member Author

more force-pushing to address @stevefaulkner and @chaals concerns/suggestions, hopefully...

@stevefaulkner stevefaulkner merged commit 2bc7f6c into w3c:master Oct 4, 2016
arronei pushed a commit to arronei/html that referenced this pull request Apr 17, 2017
- introduce the actual name="viewport" meta, as this only applies in
this specific case
- link to CSS device adaptation, currently still the only "official"
(non-Apple) doc where this is documented
- expand/rewrite advice
- include note about UAs ignoring these values (either with an opt-in
setting or outright)

thanks @patrickhlauke and @chaals for review
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants