From 4a198678a4ca97ae44ce21479177bc907d9ff678 Mon Sep 17 00:00:00 2001 From: chaals Date: Sun, 1 Apr 2018 12:48:30 +0200 Subject: [PATCH 1/2] tweaks for ismap Editorial - but includes some accessibility advice Thanks to @prlbr for the PR that made me notice these --- sections/acknowledgements.include | 1 + sections/semantics-embedded-content.include | 35 ++++++++++++--------- sections/semantics-textlevel.include | 14 ++++----- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/sections/acknowledgements.include b/sections/acknowledgements.include index dbb2ac86dc..8d96c6123b 100644 --- a/sections/acknowledgements.include +++ b/sections/acknowledgements.include @@ -72,6 +72,7 @@ Léonie Watson, Maciej Stachowiak, Mark Svancarek, + Martin Janecke, Marvin Woo 吴秀诚, Mike™ Smith, Mike West, diff --git a/sections/semantics-embedded-content.include b/sections/semantics-embedded-content.include index 41a0dab276..c80317b7d1 100644 --- a/sections/semantics-embedded-content.include +++ b/sections/semantics-embedded-content.include @@ -710,7 +710,7 @@
sizes - Image sizes between breakpoints
crossorigin - How the element handles crossorigin requests
usemap - Name of image map to use
-
ismap - Whether the image is a server-side image map
+
<{img/ismap}> - Whether the image is a server-side image map
width - Horizontal dimension
height - Vertical dimension
referrerpolicy - Referrer policy for fetches initiated by the element
@@ -2301,27 +2301,32 @@ map. This affects how events are handled on the corresponding <{a}> element. +

Users who do not have a pointing device, or who cannnot see + the image referred to will generally not be able to use a server-side image map successfully. + Authors should use another mechanism, such as a "client-side" image map + made using the <{img/usemap}> attribute, wherever possible.

+ The ismap attribute is a boolean attribute. The attribute must not be specified on an element that does not have an ancestor <{a}> element with an <{a/href}> attribute. - +
In this example the user is asked to identify a person in an image by clicking on it. The server could respond to a click by confirming the correct position or by asking the user to try again. - + <figure> <a href="solve.html"> <img src="zoo.jpg" ismap alt="Animals and people at the zoo, among them Wally with striped clothes"> </a> - <figcaption>Where’s Wally? Click on him!</figcaption> + <figcaption>Where's Wally? Click on him!</figcaption> </figure> - - The coordinates where the user clicks are send to the server with the - request for the resource referenced by the <{a}> element’s + + The coordinates where the user clicks are sent to the server with the + request for the resource referenced by the <{a}> element's href attribute.
@@ -2332,7 +2337,7 @@

- The usemap and ismap attributes can result in confusing behavior + The usemap and <{img/ismap}> attributes can result in confusing behavior when used together with <{source}> elements with the media attribute specified in a <{picture}> element.

@@ -2349,7 +2354,7 @@ reflect the usemap content attribute. The isMap IDL attribute must reflect - the ismap content attribute. + the <{img/ismap}> content attribute. The referrerPolicy IDL attribute must reflect the <{img/referrerpolicy}> content attribute, limited to only known values. @@ -4718,7 +4723,7 @@ attribute's value is a type that a plugin supports, then the value of the

Check out the new icon!

-

If a nested browsing context is not created, e.g. for security reasons or due to incorrect implementation of the <{object/name3}> attribute, +

If a nested browsing context is not created, e.g. for security reasons or due to incorrect implementation of the <{object/name3}> attribute, the target attribute in this example will instead create a new browsing context - typically a new tab - whose browsing context name is the attribute's value, and the resource that the link references will be loaded there.

@@ -5710,11 +5715,11 @@ zero or more <{track}> elements, then should not show this content to the user; it is intended for older Web browsers which do not support <{audio}>, so that legacy audio plugins can be tried, or to show text to the users of these older browsers informing them of how to access the audio contents. - +
In this example, a browser which does not support inline audio can present a download link to the user. - + <audio src="music.ogg" controls> Your browser does not support the audio element. @@ -5775,14 +5780,14 @@ zero or more <{track}> elements, then constructor is found. </div> - + <div class="example"> This example shows how different audio files can be offered to the browser. If the browser does not support a specific codec, it can play one of the alternative files offered. - + This example also shows the boolean <code>controls</code>, <code>autoplay</code>, and <code>loop</code> attributes. - + <xmp highlight="html"> <audio controls autoplay loop> <source src="music.ogg" type="audio/ogg; codecs=vorbis"/> diff --git a/sections/semantics-textlevel.include b/sections/semantics-textlevel.include index 7965ed774b..0744319fd4 100644 --- a/sections/semantics-textlevel.include +++ b/sections/semantics-textlevel.include @@ -148,7 +148,7 @@ exception. 2. Abort these steps without following the hyperlink. 3. If the target of the <code>click</code> event is an <{img}> element with an - <code>ismap</code> attribute specified, then server-side image map processing must be + <{img/ismap}> attribute specified, then server-side image map processing must be performed, as follows: 1. If the <code>click</code> event was a real pointing-device-triggered <code>click</code> event on the <{img}> element, then let |x| be the distance in CSS @@ -2704,23 +2704,23 @@ The <{u}> element <a>represents</a> a span of text with a non-textual annotation, such as labeling a proper name in Chinese text, a surname, or text as being misspelt. - + <div class="example"> Underlining as a stylistic presentation is a convention in some cases: - + <xmp highlight="html"> <p>Among others, Japanese, Hungarian and Chinese names are generally written with the family name first: <u>Wu</u> Xiaoqian.</p> - + and when the sun rises over the trees of fire, there are no other <u class="spelling">incediaris</u> as powerful in this collection of dwelling - + <p>The <u>see</u> is full of fish</p>
- + In most cases, another element is likely to be more appropriate: for marking stress emphasis, the <{em}> element should be used; for marking key words or phrases either the @@ -2729,7 +2729,7 @@ <{ruby}> element should be used; for technical terms, taxonomic designation, transliteration, a thought, or for labeling ship names in Western texts, the <{i}> element should be used. - +

The default rendering of the <{u}> element in visual presentations clashes with the conventional rendering of hyperlinks (underlining). Authors are encouraged to From 0236a5fe085fcdd2897b4ffa4edee92d0025de79 Mon Sep 17 00:00:00 2001 From: chaals Date: Tue, 3 Apr 2018 10:49:10 +0200 Subject: [PATCH 2/2] fix typpo thanks @ljwatson --- sections/semantics-embedded-content.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sections/semantics-embedded-content.include b/sections/semantics-embedded-content.include index c80317b7d1..2ede65621c 100644 --- a/sections/semantics-embedded-content.include +++ b/sections/semantics-embedded-content.include @@ -2301,9 +2301,9 @@ map. This affects how events are handled on the corresponding <{a}> element. -

Users who do not have a pointing device, or who cannnot see +

Users who do not have a pointing device, or who cannot see the image referred to will generally not be able to use a server-side image map successfully. - Authors should use another mechanism, such as a "client-side" image map + Authors should use another mechanism, such as a "client-side" image map made using the <{img/usemap}> attribute, wherever possible.

The ismap attribute is a