[whatwg] Forcing orientation in content

Roger Hågensen rescator at emsai.net
Sun Jul 14 16:05:21 PDT 2013


On 2013-07-13 06:17, Glenn Maynard wrote:

>   Changing orientation is disruptive.
>
> I can hardly imagine how obnoxious Web browsing would be on a mobile
> device, if every second page I navigated to decided to flip my device to a
> different orientation.  This feels like the same sort of misfeature as
> allowing pages to resize the browser window: "best viewed in 800x600" (so
> we'll force it), "best viewed in portrait" (so we'll force it).
>

I have a tablet here that does that with a few apps.
And one of them actually does it within itself during certain parts of 
the program.

And I can testify it's annoying as hell. For those curious it was a 
banking app. And the main menu is forced/locked. But the rest like 
account activity etc. is not.
And you can imagine how stupid it is when you have to rotate the tablet 
each time you go back to the main menu.

I find responsive and scalable design (so it looks good) on multiple 
aspects ratios and multiple PPIs is a must for modern coding.

Please note I have not said orientation at all above, instead I said 
aspect ratio as that is the key here. Any device (unless it's square) 
has only two aspects.
There really is no up or down. Again this is from experience with my 
tablet. It is rectangular and when I pick it up i pick it up. And which 
ever edge faces me becomes "down".
And I prefer a wide aspect ratio normally, but for parts with listings I 
prefer a narrow aspectratio.

My suggestion is that a webpage or web app signal to the browser what 
it's preferred aspect ratio (and resolution) is by using existing CSS 
viewport features.
But the browser is under no obligation to enforce anything.

If a rotation lock is really that desired, then the browser MUST provide 
a user toggle-able option that is off by default and is named something 
along the lines of: Allow Pages/Apps to disable rotation.
But. At the same time a similar option would also be needed called: 
Always lock Pages/Apps to "Horizontal" (or Vertical) orientation.

Now I have not looked at many tablets and phones, and certainly not 
their option screens, so I have no idea if some or several of them 
already have one of these options.

My advise is that if a page or app is aspect limited to simply keep it 
aspect limited (use the current CSS stuff to help inform the browser 
about that).
Let the user rotate the screen to whatever works best for them. For all 
one might know their device might be huge and have a very high PPI, you 
can never know.
There are people who prefer to have a monitor rotated 90 degrees, or put 
two browser windows side by side.
And as has been said, certain devices may have orientation detection 
turned off, or the device may not even have that feature at all.

Myself I think ideally that page rotation locking should be a user 
choice and put in the browser context menu so the user can just click 
and select if they wish to "lock" the rotation (for that page).
Also if a page really looks better rotated 90 degrees then the user will 
quickly figure that out anyway, by *gasp* rotating their display.
And by not allowing web pages/apps to force the orientation we also 
encourage better design.
HTML5 + CSS + Javascript is all about being fluid and dynamic and 
adaptable and being scalable and fail/fallback gracefully.
It would be silly to take a step backwards from that.

-- 
Roger "Rescator" Hågensen.
Freelancer - http://www.EmSai.net/




More information about the whatwg mailing list