8186156: Fix a11y and HTML issues in java.net and javax.net packages
Reviewed-by: lancea, mchung
--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java Fri Jul 28 14:06:28 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java Mon Aug 14 13:54:10 2017 -0700
@@ -72,10 +72,13 @@
*
* <h3> Address types </h3>
*
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em">
* <caption style="display:none">Description of unicast and multicast address types</caption>
+ * <thead>
+ * <tr><th scope="col">Address Type</th><th scope="col">Description</th></tr>
+ * </thead>
* <tbody>
- * <tr><th style="vertical-align:top"><i>unicast</i></th>
+ * <tr><th scope="row" style="vertical-align:top">unicast</th>
* <td>An identifier for a single interface. A packet sent to
* a unicast address is delivered to the interface identified by
* that address.
@@ -94,12 +97,12 @@
* IP address loops around and becomes IP input on the local
* host. This address is often used when testing a
* client.</td></tr>
- * <tr><th style="vertical-align:top"><i>multicast</i></th>
+ * <tr><th scope="row" style="vertical-align:top">multicast</th>
* <td>An identifier for a set of interfaces (typically belonging
* to different nodes). A packet sent to a multicast address is
* delivered to all interfaces identified by that address.</td></tr>
* </tbody>
- * </table></blockquote>
+ * </table>
*
* <h4> IP address scope </h4>
*
@@ -163,8 +166,7 @@
* <p> Two Java security properties control the TTL values used for
* positive and negative host name resolution caching:
*
- * <blockquote>
- * <dl>
+ * <dl style="margin-left:2em">
* <dt><b>networkaddress.cache.ttl</b></dt>
* <dd>Indicates the caching policy for successful name lookups from
* the name service. The value is specified as an integer to indicate
@@ -183,7 +185,6 @@
* A value of -1 indicates "cache forever".
* </dd>
* </dl>
- * </blockquote>
*
* @author Chris Warth
* @see java.net.InetAddress#getByAddress(byte[])
--- a/jdk/src/java.base/share/classes/java/net/URI.java Fri Jul 28 14:06:28 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/net/URI.java Mon Aug 14 13:54:10 2017 -0700
@@ -132,23 +132,23 @@
*
* <p> All told, then, a URI instance has the following nine components:
*
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em">
* <caption style="display:none">Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment</caption>
* <thead>
- * <tr><th><i>Component</i></th><th><i>Type</i></th></tr>
+ * <tr><th scope="col">Component</th><th scope="col">Type</th></tr>
* </thead>
- * <tbody>
- * <tr><td>scheme</td><td>{@code String}</td></tr>
- * <tr><td>scheme-specific-part </td><td>{@code String}</td></tr>
- * <tr><td>authority</td><td>{@code String}</td></tr>
- * <tr><td>user-info</td><td>{@code String}</td></tr>
- * <tr><td>host</td><td>{@code String}</td></tr>
- * <tr><td>port</td><td>{@code int}</td></tr>
- * <tr><td>path</td><td>{@code String}</td></tr>
- * <tr><td>query</td><td>{@code String}</td></tr>
- * <tr><td>fragment</td><td>{@code String}</td></tr>
+ * <tbody style="text-align:left">
+ * <tr><th scope="row">scheme</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">scheme-specific-part</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">authority</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">user-info</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">host</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">port</th><td>{@code int}</td></tr>
+ * <tr><th scope="row">path</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">query</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">fragment</th><td>{@code String}</td></tr>
* </tbody>
- * </table></blockquote>
+ * </table>
*
* In a given instance any particular component is either <i>undefined</i> or
* <i>defined</i> with a distinct value. Undefined string components are
@@ -253,32 +253,35 @@
* which are taken from that specification, are used below to describe these
* constraints:
*
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em">
* <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption>
- * <tbody>
- * <tr><th style="vertical-align:top"><i>alpha</i></th>
+ * <thead>
+ * <tr><th scope="col">Category</th><th scope="col">Description</th></tr>
+ * </thead>
+ * <tbody style="text-align:left">
+ * <tr><th scope="row" style="vertical-align:top">alpha</th>
* <td>The US-ASCII alphabetic characters,
* {@code 'A'} through {@code 'Z'}
* and {@code 'a'} through {@code 'z'}</td></tr>
- * <tr><th style="vertical-align:top"><i>digit</i></th>
+ * <tr><th scope="row" style="vertical-align:top">digit</th>
* <td>The US-ASCII decimal digit characters,
* {@code '0'} through {@code '9'}</td></tr>
- * <tr><th style="vertical-align:top"><i>alphanum</i></th>
+ * <tr><th scope="row" style="vertical-align:top">alphanum</th>
* <td>All <i>alpha</i> and <i>digit</i> characters</td></tr>
- * <tr><th style="vertical-align:top"><i>unreserved</i> </th>
+ * <tr><th scope="row" style="vertical-align:top">unreserved</th>
* <td>All <i>alphanum</i> characters together with those in the string
* {@code "_-!.~'()*"}</td></tr>
- * <tr><th style="vertical-align:top"><i>punct</i></th>
+ * <tr><th scope="row" style="vertical-align:top">punct</th>
* <td>The characters in the string {@code ",;:$&+="}</td></tr>
- * <tr><th style="vertical-align:top"><i>reserved</i></th>
+ * <tr><th scope="row" style="vertical-align:top">reserved</th>
* <td>All <i>punct</i> characters together with those in the string
* {@code "?/[]@"}</td></tr>
- * <tr><th style="vertical-align:top"><i>escaped</i></th>
+ * <tr><th scope="row" style="vertical-align:top">escaped</th>
* <td>Escaped octets, that is, triplets consisting of the percent
* character ({@code '%'}) followed by two hexadecimal digits
* ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
* {@code 'a'}-{@code 'f'})</td></tr>
- * <tr><th style="vertical-align:top"><i>other</i></th>
+ * <tr><th scope="row" style="vertical-align:top">other</th>
* <td>The Unicode characters that are not in the US-ASCII character set,
* are not control characters (according to the {@link
* java.lang.Character#isISOControl(char) Character.isISOControl}
@@ -287,7 +290,7 @@
* method) <i>(<b>Deviation from RFC 2396</b>, which is
* limited to US-ASCII)</i></td></tr>
* </tbody>
- * </table></blockquote>
+ * </table>
*
* <p><a id="legal-chars"></a> The set of all legal URI characters consists of
* the <i>unreserved</i>, <i>reserved</i>, <i>escaped</i>, and <i>other</i>
--- a/jdk/src/java.base/share/classes/java/net/URLConnection.java Fri Jul 28 14:06:28 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/net/URLConnection.java Mon Aug 14 13:54:10 2017 -0700
@@ -51,31 +51,16 @@
* The abstract class {@code URLConnection} is the superclass
* of all classes that represent a communications link between the
* application and a URL. Instances of this class can be used both to
- * read from and to write to the resource referenced by the URL. In
- * general, creating a connection to a URL is a multistep process:
+ * read from and to write to the resource referenced by the URL.
*
- * <div style="text-align:center"><table class="plain" style="margin:0 auto">
- * <caption style="display:none">Describes the process of creating a connection to a URL: openConnection() and connect() over time.</caption>
- * <thead>
- * <tr><th>{@code openConnection()}</th>
- * <th>{@code connect()}</th></tr>
- * </thead>
- * <tbody>
- * <tr><td>Manipulate parameters that affect the connection to the remote
- * resource.</td>
- * <td>Interact with the resource; query header fields and
- * contents.</td></tr>
- * </tbody>
- * </table>
- * ---------------------------->
- * <br>time</div>
- *
+ * <p>
+ * In general, creating a connection to a URL is a multistep process:
* <ol>
* <li>The connection object is created by invoking the
- * {@code openConnection} method on a URL.
+ * {@link URL#openConnection() openConnection} method on a URL.
* <li>The setup parameters and general request properties are manipulated.
* <li>The actual connection to the remote object is made, using the
- * {@code connect} method.
+ * {@link #connect() connect} method.
* <li>The remote object becomes available. The header fields and the contents
* of the remote object can be accessed.
* </ol>
--- a/jdk/src/java.base/share/classes/java/net/URLPermission.java Fri Jul 28 14:06:28 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/net/URLPermission.java Mon Aug 14 13:54:10 2017 -0700
@@ -72,22 +72,22 @@
* separated by '/' characters. <i>path</i> may also be empty. The path is specified
* in a similar way to the path in {@link java.io.FilePermission}. There are
* three different ways as the following examples show:
- * <table class="plain">
+ * <table class="striped">
* <caption>URL Examples</caption>
* <thead>
- * <tr><th>Example url</th><th>Description</th></tr>
+ * <tr><th scope="col">Example url</th><th scope="col">Description</th></tr>
* </thead>
- * <tbody>
- * <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td>
+ * <tbody style="text-align:left">
+ * <tr><th scope="row" style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</th>
* <td>A url which identifies a specific (single) resource</td>
* </tr>
- * <tr><td>http://www.oracle.com/a/b/*</td>
+ * <tr><th scope="row">http://www.oracle.com/a/b/*</th>
* <td>The '*' character refers to all resources in the same "directory" - in
* other words all resources with the same number of path components, and
* which only differ in the final path component, represented by the '*'.
* </td>
* </tr>
- * <tr><td>http://www.oracle.com/a/b/-</td>
+ * <tr><th scope="row">http://www.oracle.com/a/b/-</th>
* <td>The '-' character refers to all resources recursively below the
* preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
* example).
@@ -114,11 +114,12 @@
* methods and permitted request headers of the permission (respectively). The two lists
* are separated by a colon ':' character and elements of each list are comma separated.
* Some examples are:
- * <pre>
- * "POST,GET,DELETE"
- * "GET:X-Foo-Request,X-Bar-Request"
- * "POST,GET:Header1,Header2"
- * </pre>
+ * <ul>
+ * <li>"POST,GET,DELETE"
+ * <li>"GET:X-Foo-Request,X-Bar-Request"
+ * <li>"POST,GET:Header1,Header2"
+ * </ul>
+ * <p>
* The first example specifies the methods: POST, GET and DELETE, but no request headers.
* The second example specifies one request method and two headers. The third
* example specifies two request methods, and two headers.
@@ -253,16 +254,16 @@
* <table class="plain">
* <caption>Examples of Path Matching</caption>
* <thead>
- * <tr><th>this's path</th><th>p's path</th><th>match</th></tr>
+ * <tr><th scope="col">this's path</th><th scope="col">p's path</th><th>match</th></tr>
* </thead>
- * <tbody>
- * <tr><td>/a/b</td><td>/a/b</td><td>yes</td></tr>
- * <tr><td>/a/b/*</td><td>/a/b/c</td><td>yes</td></tr>
- * <tr><td>/a/b/*</td><td>/a/b/c/d</td><td>no</td></tr>
- * <tr><td>/a/b/-</td><td>/a/b/c/d</td><td>yes</td></tr>
- * <tr><td>/a/b/-</td><td>/a/b/c/d/e</td><td>yes</td></tr>
- * <tr><td>/a/b/-</td><td>/a/b/c/*</td><td>yes</td></tr>
- * <tr><td>/a/b/*</td><td>/a/b/c/-</td><td>no</td></tr>
+ * <tbody style="text-align:left">
+ * <tr><th scope="row">/a/b</th><th scope="row">/a/b</th><td>yes</td></tr>
+ * <tr><th scope="row" rowspan="3">/a/b/*</th><th scope="row">/a/b/c</th><td>yes</td></tr>
+ * <tr> <th scope="row">/a/b/c/d</th><td>no</td></tr>
+ * <tr> <th scope="row">/a/b/c/-</th><td>no</td></tr>
+ * <tr><th scope="row" rowspan="3">/a/b/-</th><th scope="row">/a/b/c/d</th><td>yes</td></tr>
+ * <tr> <th scope="row">/a/b/c/d/e</th><td>yes</td></tr>
+ * <tr> <th scope="row">/a/b/c/*</th><td>yes</td></tr>
* </tbody>
* </table>
*/
--- a/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html Fri Jul 28 14:06:28 2017 +0200
+++ b/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html Mon Aug 14 13:54:10 2017 -0700
@@ -23,7 +23,7 @@
or visit www.oracle.com if you need additional information or have any
questions.
-->
-<HTML>
+<HTML lang="EN">
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Networking Properties</TITLE>
@@ -35,7 +35,7 @@
java.net package. Some are checked only once at startup of the VM,
and therefore are best set using the -D option of the java command,
while others have a more dynamic nature and can also be changed using
-the <a href="../../lang/System.html#setProperty(java.lang.String,%20java.lang.String)">System.setProperty()</a> API.
+the <a href="../../lang/System.html#setProperty-java.lang.String-java.lang.String-">System.setProperty()</a> API.
The purpose of this document is to list
and detail all of these properties.</P>
<P>If there is no special note, a property value is checked every time it is used.</P>
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java Fri Jul 28 14:06:28 2017 +0200
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java Mon Aug 14 13:54:10 2017 -0700
@@ -1292,7 +1292,7 @@
* href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
* Application-Layer Protocol Negotiation (ALPN), can negotiate
* application-level values between peers.
- * <p>
+ *
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
@@ -1317,7 +1317,7 @@
* Like {@link #getHandshakeSession()},
* a connection may be in the middle of a handshake. The
* application protocol may or may not yet be available.
- * <p>
+ *
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java Fri Jul 28 14:06:28 2017 +0200
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java Mon Aug 14 13:54:10 2017 -0700
@@ -646,7 +646,7 @@
* requested by the peer, the underlying protocol will determine what
* action to take. (For example, ALPN will send a
* {@code "no_application_protocol"} alert and terminate the connection.)
- * <p>
+ *
* @implSpec
* This method will make a copy of the {@code protocols} array.
*
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java Fri Jul 28 14:06:28 2017 +0200
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java Mon Aug 14 13:54:10 2017 -0700
@@ -702,7 +702,7 @@
* href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
* Application-Layer Protocol Negotiation (ALPN), can negotiate
* application-level values between peers.
- * <p>
+ *
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.
@@ -727,7 +727,7 @@
* Like {@link #getHandshakeSession()},
* a connection may be in the middle of a handshake. The
* application protocol may or may not yet be available.
- * <p>
+ *
* @implSpec
* The implementation in this class throws
* {@code UnsupportedOperationException} and performs no other action.