[whatwg] Subsequent access to empty string URLs (Was: Base URL’s effect on an empty @src element)
Leif Halvard Silli
xn--mlform-iua at xn--mlform-iua.no
Wed May 1 12:45:31 PDT 2013
Anne van Kesteren on Wed May 1 09:46:50 PDT 2013:
> On Wed, May 1, 2013 at 5:39 PM, Boris Zbarsky wrote:
>> Interesting. Certainly at the point when Gecko implemented the current
>> behavior I recall it matching the spec…
Thanks so much, Darin, Boris and Anne.
> Changed in: http://html5.org/r/4841
>
> Context:
>
http://lists.w3.org/Archives/Public/public-whatwg-archive/2010Mar/thread.html#msg67
FOLLOW-UP on src="<empty>":
If @src is empty (and there is no base url) a 'subsequent access' via
a contextual menu, such as 'Show/Open image' or 'Save/Download image'
has no effect in Firefox20, Opera12, IE10. Whereas Safari/Chrome do
provide a contextual menu item for those features. (And the UA results
are the same - except with regard to Firefox, also if there *is* a base
URL.)
Webkit/Blink seems inconsistent/buggy, right?
A special detail is the last paragraph of section '2.5.3 Dynamic
changes to base URLS'[1] which implies that a change to the base URL
should (even when @src is empty, one must assume, not?) affect the @src
URL so that a 'subsequent access' via context menu could be used to
e.g. open the image resource set by the base URL. Is it meaningful?
By now, only Webkit/Blink let base URL affect the subsequent access.
(And Firefox, but that's because of the bug.)
FOLLOW-UP w.r.t. cite="<empty>" and longdesc="<empty>":
What if @cite or @longdesc are empty? Personally, I think it would
be simplest to handle at least @longesc - but probably @cite too - the
same way that @src is handled. The relevance to subsequent access to
empty @src is that @longdesc and @cite tend, from users’ point of view,
to be subsequently accessed (e.g. via context menu).
Currently, the HTML spec doesn't even require the @cite attribute to
be a *non-empty* URL - thus it can be empty.[2] By contrast, the
@longdesc cannot be empty.[3] What is the use case for an empty @cite
attribute?
For @longdesc, the ‘trend’ of implementations is to ignore the
longdesc when it is the empty string.[4] And basically, my motivation
for these letters is to make sure that the longdesc spec can safely say
- without conflicting with anything else - that implementations should
ignore empty longdesc attributes.[5]
[1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#dynamic-changes-to-base-urls
[2]
http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#attr-blockquote-cite
[3]
https://dvcs.w3.org/hg/html-proposals/raw-file/default/longdesc1/longdesc.html#attributes
[4] https://www.w3.org/Bugs/Public/show_bug.cgi?id=21778#c2
[5] https://www.w3.org/Bugs/Public/show_bug.cgi?id=21778#c4
--
leif halvard silli
More information about the whatwg
mailing list