Re: Alternative Style Sheets

>> Cookie handling makes this possible:

> Cookie handling makes it up to the site to decide which pages a particular selection of a style set applies to, which a site is best-placed to do because it knows which pages are actually related to each other design-wise.

My preference would always be to avoid the author having to write any JavaScript or cookie handling code, or anything where the behaviour might be unexpectedly different from site-to-site. Detecting and reacting to the cookies could be negative for performance, and any time we don't have to set a cookie at all is a benefit for anyone getting close to cookie size limits. If we are defining a behaviour, it should work easily for everyone.

The stylesheets could be related together by title (as a grouping). So if:

http://www.mysite.com/a.html

… had:
<link rel="alternate stylesheet" title="High Contrast" href="/css/high-contrast.css" />
… and:
http://www.mysite.com/subfolder/b.html
… had:
<link rel="alternate stylesheet" title="High Contrast" href="/css/high-contrast-b.css" />
…then we could persist that behaviour but with different stylesheets, as long as they shared the same title. If we were really worried about scoping we could have:
<link rel="alternate stylesheet" title="High Contrast" href="/css/high-contrast-b.css" scope="fqdn" />
…where scope could be fqdn, tld, folder, page, and other such values to control scope.
> I think that the concept of alternate style sheets is somehow too unspecific for this use case. To address it, it would be nice to specify a standardized set of style sheet alternatives for the most common accessibility needs, such as big font size, high contrast, keyboard-only navigation or whatever. They could be identified with special values of the @rel attribute. An author who cares about creating e.g. an alternative stylesheet with high contrast would link it with rel="high-contrast stylesheet" instead of "alternate stylesheet".

Absolutely, we could use the rel attribute to group with something more sensible than a human-readable title. But to have a standardized set restricts us from using this for more abstract purposes, or from coming up with more use cases without requiring buy-in from UAs and the W3C. For example, a small font size is friendly to those with tunnel vision, but if this was missed from the original list, how would we then add it?
As an aside, I don't see why a keyboard-only user would need a different style-sheet ever… We are discussing modifying presentation. A keyboard-only user does not necessarily need any changes to presentation. That doesn't mean that the author shouldn't have the choice of making one if they want to, but it oughtn't be in a finite list. This is another argument for allowing unlimited types of alternate stylesheet.
AK



On 12 Oct 2012, at 20:44, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 10/12/12 3:41 PM, "Gérard Talbot" wrote:
>>> The problem is persisted across what.  Page?  Hostname?  Something else?
>> 
>> Persistence over visits. When I revisit, say,
>> 
>> http://www.howtocreate.co.uk/ie8.html
>> 
>> I want the webpage to serve me my preferred alternate stylesheet which is
>> , in my case, the Moosified alternate stylesheet.
> 
> Yes, yes.  But what should happen when you visit
> 
>  http://www.howtocreate.co.uk/
> 
> ?  Consider both the cases when it has an alternate stylesheet called "Moosified" and when it does not.
> 
>> Cookie handling makes this possible:
> 
> Cookie handling makes it up to the site to decide which pages a particular selection of a style set applies to, which a site is best-placed to do because it knows which pages are actually related to each other design-wise.
> 
> -Boris
> 

Received on Friday, 12 October 2012 20:30:49 UTC