From mnot at mnot.net Sun Sep 1 18:08:48 2013 From: mnot at mnot.net (Mark Nottingham) Date: Mon, 2 Sep 2013 11:08:48 +1000 Subject: [whatwg] Zip archives as first-class citizens In-Reply-To: References: <414B89D4-9758-4E38-80C8-7C3630EA4971@mnot.net> Message-ID: On 29/08/2013, at 9:13 PM, Anne van Kesteren wrote: > * Resources that can contain subresources (HTML, CSS, JavaScript, > workers, ...) would need to have an outer and inner location. If you > have e.g. updating the address bar to > #path=test.html&id=test is somewhat magic. For > it'd be pretty magic too. *sigh* good point. > * For origin comparison you'd have to look at the outer location. I kinda wonder if it should; if ZIP is really being used as a packaging format, the idea is to make it portable, right? So a ZIP should run just as well from the local filesystem (file://) as it should from the original Web site, or one it's copied to, or if it's just relocated to a different place. CORS should be set up properly, assumptions shouldn't be made about its context, etc. Just my .02, YMMV. Cheers, -- Mark Nottingham http://www.mnot.net/ From contact at nickshanks.com Mon Sep 2 06:04:34 2013 From: contact at nickshanks.com (Nicholas Shanks) Date: Mon, 2 Sep 2013 14:04:34 +0100 Subject: [whatwg] Zip archives as first-class citizens In-Reply-To: References: Message-ID: On 28 August 2013 14:32, Anne van Kesteren wrote: > We have thought of three approaches for zip URL design thus far: > > * Using a sub-scheme (zip) with a zip-path (after !): > zip:http://www.example.org/zip!image.gif > * Introducing a zip-path (after %!): http://www.example.org/zip%!image.gif > * Using media fragments: http://www.example.org/zip#path=image.gif Am I missing something? I assume you want to basically send a whole bunch of files down the pipe when any one of them is requested, not send the individual file's bytestream from a zip. If so, then why is this not acceptable: === Load Game GET http://website.example/game.webzip/load.html Accept: application/webzip, */*;q=0.1 # UA supports looking inside zips 200 OK Content-Type: application/webzip Content-Location: /game.webzip # server knows to send zip -- vs. -- Load Game GET http://website.example/game.webzip/load.html Accept: text/html, */*;q=0.1 # no support 200 OK Content-Type: text/html Content-Location: /game.webzip_files/load.html # server knows file resides elsewhere === HTTP server knows to send a zip file if UA supports a new content type. HTTP server also knows to send back the file from inside the zip (or an unzipped sibling directory to contain the file to serve) to clients that do not support the new mime type. This can be as simple as a mod_rewrite rule executed iff mod_webzip is not loaded. MIME type would only be requested in Accept header by supporting client if the path contained /\.webzip\// otherwise omitted. All relative URIs work as if the file was at the request URI. No multiple scheme hassles, no multiple fragment hassles. No special delimiters that might already be in use. The change in filename also means a concious action on part of the webmaster to allow access. As suggested, the file format can be a stricter form of zip that doesn't allow multiple file tables. The server would have to validate this before sending the file As suggested, the content types of resources in the zip would be determined from a list of file extensions defined by the spec. Anything else get's a default such as application/unknown. -- Nicholas. From jaffathecake at gmail.com Tue Sep 3 03:45:47 2013 From: jaffathecake at gmail.com (Jake Archibald) Date: Tue, 3 Sep 2013 11:45:47 +0100 Subject: [whatwg] Script preloading In-Reply-To: <179BF344-B282-4445-AB2B-5D467D32258D@apple.com> References: <179BF344-B282-4445-AB2B-5D467D32258D@apple.com> Message-ID: On 31 August 2013 00:04, Ryosuke Niwa wrote: > It'll be much harder to implement a new dependency API that replies on CSS > selectors if we care about the performance at all. > Where does the performance issue come from? It would only need to be resolved once on node creation or insertion into the document (the latter of the two). It's only used for execution, downloads can still be triggered without resolving the selectors (eg, by a pre-scanner). From annevk at annevk.nl Tue Sep 3 05:49:15 2013 From: annevk at annevk.nl (Anne van Kesteren) Date: Tue, 3 Sep 2013 13:49:15 +0100 Subject: [whatwg] Zip archives as first-class citizens In-Reply-To: References: Message-ID: On Mon, Sep 2, 2013 at 2:04 PM, Nicholas Shanks wrote: > Am I missing something? I assume you want to basically send a whole > bunch of files down the pipe when any one of them is requested, not > send the individual file's bytestream from a zip. If so, then why is > this not acceptable: > > === > Load Game > > GET http://website.example/game.webzip/load.html > Accept: application/webzip, */*;q=0.1 # UA supports looking inside zips > > 200 OK > Content-Type: application/webzip > Content-Location: /game.webzip # server knows to send zip > > -- vs. -- > > Load Game > > GET http://website.example/game.webzip/load.html > Accept: text/html, */*;q=0.1 # no support > > 200 OK > Content-Type: text/html > Content-Location: /game.webzip_files/load.html # server knows file > resides elsewhere > === This is a pretty interesting suggestion, but I think the setup is too complicated. Even setting a simple header such as Access-Control-Allow-Origin: * is a problem. -- http://annevankesteren.nl/ From rniwa at apple.com Tue Sep 3 11:27:44 2013 From: rniwa at apple.com (Ryosuke Niwa) Date: Tue, 03 Sep 2013 11:27:44 -0700 Subject: [whatwg] Script preloading In-Reply-To: References: <179BF344-B282-4445-AB2B-5D467D32258D@apple.com> Message-ID: On Sep 3, 2013, at 3:45 AM, Jake Archibald wrote: > On 31 August 2013 00:04, Ryosuke Niwa wrote: > >> It'll be much harder to implement a new dependency API that replies on CSS >> selectors if we care about the performance at all. >> > > Where does the performance issue come from? It would only need to be > resolved once on node creation or insertion into the document (the latter > of the two). It's only used for execution, downloads can still be triggered > without resolving the selectors (eg, by a pre-scanner). >From the fact selector matching is slow. I'm opposed to adding selector dependency unless there is a very important use case that can't be addressed by referring to a script by an element id or a script filename. - R. Niwa From bzbarsky at MIT.EDU Tue Sep 3 12:42:54 2013 From: bzbarsky at MIT.EDU (Boris Zbarsky) Date: Tue, 03 Sep 2013 15:42:54 -0400 Subject: [whatwg] Script preloading In-Reply-To: References: <179BF344-B282-4445-AB2B-5D467D32258D@apple.com> Message-ID: <52263BBE.60506@mit.edu> On 9/3/13 2:27 PM, Ryosuke Niwa wrote: > From the fact selector matching is slow. Hold on. Back up. Selector matching can't be all that "slow" per se: browsers do it a _lot_. Do you mean doing the equivalent of document.querySelectorAll can be slow? -Boris From ian at hixie.ch Tue Sep 3 13:44:40 2013 From: ian at hixie.ch (Ian Hickson) Date: Tue, 3 Sep 2013 20:44:40 +0000 (UTC) Subject: [whatwg] Global script clean-up jobs and "spin the event loop" In-Reply-To: References: Message-ID: On Tue, 28 May 2013, Glenn Maynard wrote: > > "Jump to a code entry-point" essentially maintains a stack of entry > scripts, to determine the "outermost" script in order to know whether to > run the global clean-up jobs. This assumes that this algorithm will > always be entered and exited as a stack: an invocation of the algorithm > must always complete after any later invocations. > > Does this hold even in the face of multiple nested invocations of "spin > the event loop" algorithm? That algorithm doesn't seem to try to > guarantee any kind of stack-like behavior. I've fixed this, but I haven't tested to see what browsers actually do in this case. (This can only happen, as far as I can tell, in nested showModalDialog() loops that happen to resume out-of-order. I suspect in reality browsers won't let you do this, which would make this moot?) -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Tue Sep 3 13:51:56 2013 From: ian at hixie.ch (Ian Hickson) Date: Tue, 3 Sep 2013 20:51:56 +0000 (UTC) Subject: [whatwg] registerProtocolHandler - allow site to specify more info and do custom handling In-Reply-To: References: Message-ID: On Thu, 30 May 2013, chris cargile wrote: > > there seems to be a limitation that either registerProtocolHanlder() > takes GET requests but not POST requests Since you are only ever sent a URL, this seems like the appropriate kind of request, no? On Thu, 30 May 2013, chris cargile wrote: > > https://www.w3.org/Bugs/Public/show_bug.cgi?id=22022. I don't really understand the problem here. Can you elaborate? What problem are you trying to resolve? -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Tue Sep 3 13:57:39 2013 From: ian at hixie.ch (Ian Hickson) Date: Tue, 3 Sep 2013 20:57:39 +0000 (UTC) Subject: [whatwg] inputmode feedback In-Reply-To: References: <511BE988.7070208@lamouri.fr> <5130C9A1.2020200@lamouri.fr> Message-ID: On Thu, 6 Jun 2013, Jonas Sicking wrote: > On Thu, Jun 6, 2013 at 2:08 PM, Ian Hickson wrote: > > On Fri, 15 Feb 2013, Jonas Sicking wrote: > >> > >> Using semantic names might give us the warm fuzzies, but is there > >> really any semantic use we will get out of these that we wouldn't by > >> using "lowercase", "titlecase" or "autocapitalized"? > > > > The reason I used the more "semantic" names is that the names like > > "lowercase", "titlecase" or "autocapitalized" aren't accurate. For > > example, you can hit shift in "lowercase" mode to get uppercase. You > > can have a "titlecase" mode that doesn't capitalise every word (e.g. > > it recognises the "van" in "van Kesteren"). A value that is explicitly > > for names can use a different dictionary than one that is just for > > capitalised text (e.g. derived from the user's contact list). And so > > on. > > > >> I take it verbatim and name would disable any spelling corrections, > >> and name would also titlecase? But the difference between text and > >> prose seems really hard to understand. > > > > In the spec, "verbatim" does not correction at all, e.g. passwords; > > "latin" is for human-to-computer communications, e.g. free-form text > > search fields, and would do spelling correction and automatically > > inserting spaces between words in swiping keyboards, etc; and > > "latin-prose" is intended for human-to-human communications, with > > aggressive automatic typing correction, e.g. text prediction and > > automatic capitalisation at the start of sentences. > > I think a really important question is if this is understandable to > authors. There's also a big risk that if these modes aren't noticeably > different in initial implementations, it will be hard to add such > differences later. I agree that those are concerns. I don't know how to resolve them. I'm certainly open to clearer names. I don't think "titlecase" is a better name, as it either implies that we only capitalise every first letter and forego much of the potential helpfulness that "latin-name" can provide. I don't think "autocapitalized" should imply "autocorrect" in the way that "latin-prose" should. "latin-prose" vs "latin-name" seem straight-forward enough; I agree that "latin" is confusing in that context, though once you explain that "latin" is the basis of "latin-prose" and "latin-name", I think it becomes clear. Other suggestions welcome. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Tue Sep 3 14:09:30 2013 From: ian at hixie.ch (Ian Hickson) Date: Tue, 3 Sep 2013 21:09:30 +0000 (UTC) Subject: [whatwg] @generator-unable-to-provide-required-alt, figure with figcaption In-Reply-To: <0525D1DC-57F5-4F4C-838E-D7D280E9D984@prlbr.com> References: <6D789473-22C6-48B1-BD55-1D375834178A@prlbr.com> <026D354F-5220-4F2B-823F-125249027E52@prlbr.com> <0525D1DC-57F5-4F4C-838E-D7D280E9D984@prlbr.com> Message-ID: On Sat, 8 Jun 2013, Jukka K. Korpela wrote: > 2013-06-08 0:13, Ian Hickson wrote: > > On Sun, 2 Jun 2013, Jukka K. Korpela wrote: > > > > > > The purpose presented is "to avoid markup generators from being > > > pressured into replacing the error of omitting the alt attribute > > > with the even more egregious error of providing phony alternative > > > text". This is rather speculative, and it seems to lead to various > > > attempts that are more or less self-contradictory. > > > > It's not that speculative, your e-mail is a response to a markup > > generator implementor who feels pressured in exactly this way! > > And who wrote that generator-unable-to-provide-required-alt is... > inadequate. Just because the solution is inadequate doesn't mean the problem isn't real. You were saying the problem wasn't real; I was pointing to a counterproof. I would be the first to agree that the spec isn't perfect. > > > Authors of generators always have the option of generating things like > > > alt="(an image)", which can hardly be worse than lack of alt attribute. > > > > It's worse because it prevents authors from being able to find images that > > are lacking good alternative text, and because it makes it less likely > > that future user agents will try to automatically figure out what the > > alternative text should be (since one is already provided). > > To a user, even ?(an image)? is better than lack of alt attribute I disagree. The lack of an alt attribute can be used by user agents to substitute the string "(an image)", in which case it is the same, or it can be used to do far more, e.g. image recognition, OCR, etc. This isn't academic, these technologies exist today. > which is what generator-unable-to-provide-required-alt really means To the non-validator user agent, that attribute means nothing. It's a non-conforming attribute with no semantics to any software outside content generators and conformance checkers. > To analyze which images lack good alternative texts, you need to look at > the images in their context. It?s just wrong to assume that they can be > identified using some simple automated analysis. If you don't write bad alternative text (like "(an image)"), but sometimes write no alternative text at all, then detecting images without good alternative text is the same as detecting images with no alternative text. Certainly, detecting images with present but bad alternative text is a much harder problem -- that's why we should discourage the use of bad alternative text such as "(an image)". > And future user agents won?t try to figure out what the alternative text > should be, any more than current browsers do such things. It is just > wishful thinking to expect such processing, and if browsers tried to do > such things, they would just mess things up. We are far closert to this than I think you realise. Try doing image searches in G+, for exmaple (assuming you have a lot of photographs in your G+ stream). Even with virtually no context, no captions, no incoming links from other pages, and so forth, G+ image search can return accurate results for searches like "house", "tree", "cat", and so forth. It's not at all a stretch to imagine the next stage of this technology is the ability to describe an image. It won't happen tomorrow, maybe not even next year, but HTML is likely to be with us for decades more. On Tue, 18 Jun 2013, Steve Faulkner wrote: > > > > >> > > > > >> > > > > > > > > > > If you have a caption from the user (as opposed to replacement > > > > > text), then this is a perfectly valid option. It's as valid as > > > > > the
case, and means the same thing. > > > > > > the above statement is bad advice: > > > > > > browsers map title to the accessible name in accessibility APIs when > > > alt is absent, so-- > > > > ...so the browsers are buggy. This is not unusual. File bugs. :-) > > Indeed, since you've demonstrated yourself able to write code, you > > could just go and fix the bugs directly. :-) > > This behavior doesn't appear to be due to a bug, its by design, the > title attribute is used as an accessible name of last resort for all > elements and its implemented pretty much in the same (interoperable) way > in all browsers. That doesn't mean it's not a bug. > > Writing specs for the lowest-common-denominator is not the way we'll > > get a usable, accessible Web. We might sometimes be forced to when > > there are compat requirements with massively deployed content that Web > > author are relying on that prevent certain behaviours from being > > fixed, but this really doesn't apply in the case of ATs, since the > > vast majority of authors have never tested how their pages work in > > ATs. > > I don't understand what you are saying here, can you elaborate? Which part is unclear? On Thu, 20 Jun 2013, Martin Janecke wrote: > >> > >> Unfortunately -- although its verbosity is there to prevent any > >> misunderstanding for its use -- it might leave the impression that a > >> generator writing > >> > >> > >> > >> is not as good as a generator writing > >> > >> an image > > > > Indeed. I don't know of a way to fix that. It's always going to be the > > case that a generator doing the wrong thing in a way that is > > machine-readably indistinguishable from the right thing is more likely > > to look correct at a quick glance than a generator that is doing the > > wrong thing in a machine-detectable way. I don't know what we can do > > about that. > > > > I'm open to suggestions. > > I see. Unfortunately I do not have a better idea. If anyone does come up with one, please speak up! -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.' From ian at hixie.ch Tue Sep 3 14:38:35 2013 From: ian at hixie.ch (Ian Hickson) Date: Tue, 3 Sep 2013 21:38:35 +0000 (UTC) Subject: [whatwg] Reconsidering how we deal with text track cues In-Reply-To: References: <51BFCCA6.4080208@brendanlong.com> Message-ID: On Wed, 12 Jun 2013, Brendan Long wrote: > On 06/11/2013 11:11 PM, Silvia Pfeiffer wrote: > > > > I suggest we rename WebVTTCue [1] to VTTCaptionCue and allow such cues > > only on tracks of kind={caption, subtitle}. > > Why VTTCaptionCue and not just HTMLCue? It seems like any cue that can > be rendered needs to be able to provide its content as HTML, and once we > have that, the browser shouldn't care where we got that HTML from. This premise seems quite wrong. Can you elaborate on why you think that? > Do we expect browsers to have special rendering rules for every caption > format? Each caption format _does_ have special rendering rules. > It seems like the most likely result would be that the browser vendors > just don't bother implementing anything besides WebVTT. That seems like a likely scenario, which seems fine. On Mon, 17 Jun 2013, Silvia Pfeiffer wrote: > On Thu, Jun 13, 2013 at 3:08 AM, Ian Hickson wrote: > > On Wed, 12 Jun 2013, Silvia Pfeiffer wrote: > >> > >> As we continue to evolve the functionality of text tracks, we will > >> introduce more complex other structured content into cues and we will > >> want browsers to parse and interpret them. > > > > I think it's a mistake to try to solve problems before they exist. We > > don't know exactly what we'll be adding in the future, so we don't > > know what we'll need yet. > > I'm preparing to start specifying how to render chapters. There's > already been mention of need for a thumbnail image in chapters. > > I'll also have to specify how to "render" descriptions. Since the target > audience are blind and vision-impaired users, there will be a rendering > algorithm that includes speech synthesis. > > This is a problem I have to deal with now. I don't think the problems you describe here require any changes to the API or to the format, but maybe I'm missing something. (Images for chapters would, I guess, if you're not using the images from the video file, but why wouldn't you use those actual images?) > >> For example, I expect that once we have support for speech synthesis > >> in browsers [1], cues of kind descriptions will be voiced by speech > >> synthesis, and eventually we want to influence that speech synthesis > >> with markup (possibly a subpart of SSML [2] or some other simpler > >> markup that influences prosody). > > > > I think it's highly unlikely that we'll actually ever want that, but > > if we ever do, then we should fix the problem then. > > Rendering description cues with speech synthesis is 100% something that > is coming. Richer markup of description cues is then just the logical > next step - it won't be required now, but is certainly on the roadmap. > How likely it will be to be SSML is unclear - I'd much prefer a simpler > markup for WebVTT, too. I'm not even remotely convinced that speech synthesis in description cues needs any markup, let alone markup more elaborate than VTT already has. > >> All of these new cue settings would end up as new attributes on the > >> WebVTTCue object. This is a dangerous design path that we have taken. > > > > This is wrong on two points. One, there's nothing forcing a text track > > format to only generate one kind of object -- just like HTML generates > > different objects for different elements, WebVTT could generate > > different objects for different cues. > > Indeed, that's what I believe will be necessary. > > > Two, it's not dangerous to have an object with lots of fields. > > Why then do we then distinguish between a HTMLMediaElement, a > HTMLVideoElement and a HTMLAudioElement? What reasons make us create new > objects? It's just a matter of convenience.