8184023: Fix tables in doc comments to be accessible
authorjjg
Tue, 11 Jul 2017 18:09:10 -0700
changeset 45866 5070422dda41
parent 45865 6f34db8be1bc
child 45867 ca77ebd05a06
8184023: Fix tables in doc comments to be accessible Reviewed-by: ksrini
langtools/src/jdk.javadoc/share/classes/com/sun/javadoc/Tag.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/javadoc/Tag.java	Fri Jul 07 10:21:48 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/javadoc/Tag.java	Tue Jul 11 18:09:10 2017 -0700
@@ -78,16 +78,20 @@
      * the following table lists those cases where there is more
      * than one tag of a given kind:
      *
-     * <table border="1">
+     * <table class="striped">
      * <caption>Related Tags</caption>
-     * <tr><th>{@code kind()  }</th>  <th>{@code name()      }</th></tr>
-     * <tr><td>{@code @throws }</td>  <td>{@code @throws     }</td></tr>
-     * <tr><td>{@code @throws }</td>  <td>{@code @exception  }</td></tr>
-     * <tr><td>{@code @see    }</td>  <td>{@code @see        }</td></tr>
-     * <tr><td>{@code @see    }</td>  <td>{@code @link       }</td></tr>
-     * <tr><td>{@code @see    }</td>  <td>{@code @linkplain  }</td></tr>
-     * <tr><td>{@code @serial }</td>  <td>{@code @serial     }</td></tr>
-     * <tr><td>{@code @serial }</td>  <td>{@code @serialData }</td></tr>
+     * <thead>
+     * <tr><th scope="col">{@code name()  }  <th scope="col">{@code kind()      }
+     * </thead>
+     * <tbody style="text-align:left">
+     * <tr><th scope="row">{@code @exception  }  <td>{@code @throws }
+     * <tr><th scope="row">{@code @link       }  <td>{@code @see    }
+     * <tr><th scope="row">{@code @linkplain  }  <td>{@code @see    }
+     * <tr><th scope="row">{@code @see        }  <td>{@code @see    }
+     * <tr><th scope="row">{@code @serial     }  <td>{@code @serial }
+     * <tr><th scope="row">{@code @serialData }  <td>{@code @serial }
+     * <tr><th scope="row">{@code @throws     }  <td>{@code @throws }
+     * </tbody>
      * </table>
      *
      * @return the kind of this tag.
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java	Fri Jul 07 10:21:48 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java	Tue Jul 11 18:09:10 2017 -0700
@@ -135,18 +135,44 @@
  * <h4>Interactions with older options.</h4>
  *
  * The new {@code --show-*} options provide a more detailed replacement
- * for the older options -public, -protected, -package, -private.
+ * for the older options {@code -public}, {@code -protected}, {@code -package}, {@code -private}.
  * Alternatively, the older options can continue to be used as shorter
  * forms for combinations of the new options, as described below:
- <table style="font-family: monospace" border=1>
-    <caption>Short form options mapping</caption>
-    <tr><th>Older option<th colspan="5">Equivalent to these values with the new option
-    <tr><th><th>{@code --show-members}<th>{@code --show-types}<th>{@code --show-packages}<th>{@code --show-module-contents}
-    <tr><td>{@code -public}<td>public<td>public<td>exported<td>api
-    <tr><td>{@code -protected}<td>protected<td>protected<td>exported<td>api
-    <tr><td>{@code -package}<td>package<td>package<td>all<td>all
-    <tr><td>{@code -private}<td>private<td>private<td>all<td>all
-  </table>
+ * <table class="striped">
+ *   <caption>Short form options mapping</caption>
+ *   <thead>
+ *       <tr>   <th rowspan="2" scope="col" style="vertical-align:top">
+ *                      Older option
+ *              <th colspan="5" scope="col" style="border-bottom: 1px solid black">
+ *                      Equivalent to these values with the new option
+ *       <tr>   <th scope="col">{@code --show-members}
+ *              <th scope="col">{@code --show-types}
+ *              <th scope="col">{@code --show-packages}
+ *              <th scope="col">{@code --show-module-contents}
+ *   </thead>
+ *   <tbody>
+ *       <tr>   <th scope="row">{@code -public}
+ *              <td>public
+ *              <td>public
+ *              <td>exported
+ *              <td>api
+ *       <tr>   <th scope="row">{@code -protected}
+ *              <td>protected
+ *              <td>protected
+ *              <td>exported
+ *              <td>api
+ *       <tr>   <th scope="row">{@code -package}
+ *              <td>package
+ *              <td>package
+ *              <td>all
+ *              <td>all
+ *       <tr>   <th scope="row">{@code -private}
+ *              <td>private
+ *              <td>private
+ *              <td>all
+ *              <td>all
+ *   </tbody>
+ * </table>
  * <p>
  * <a id="qualified"></a>
  * A <em>qualified</em> element name is one that has its package
@@ -283,39 +309,44 @@
  * <p>The following table gives a guide to the mapping from old types to their replacements.
  * In some cases, there is no direct equivalent.
  *
- * <table style="font-family: monospace" border=1>
-    <caption>Guide for mapping old types to new types</caption>
-    <tr><th>Old Type<th>New Type
-    <tr><td>AnnotatedType<td>javax.lang.model.type.Type
-    <tr><td>AnnotationDesc<td>javax.lang.model.element.AnnotationMirror
-    <tr><td>AnnotationDesc.ElementValuePair<td>javax.lang.model.element.AnnotationValue
-    <tr><td>AnnotationTypeDoc<td>javax.lang.model.element.TypeElement
-    <tr><td>AnnotationTypeElementDoc<td>javax.lang.model.element.ExecutableElement
-    <tr><td>AnnotationValue<td>javax.lang.model.element.AnnotationValue
-    <tr><td>ClassDoc<td>javax.lang.model.element.TypeElement
-    <tr><td>ConstructorDoc<td>javax.lang.model.element.ExecutableElement
-    <tr><td>Doc<td>javax.lang.model.element.Element
-    <tr><td>DocErrorReporter<td>jdk.javadoc.doclet.Reporter
-    <tr><td>Doclet<td>jdk.javadoc.doclet.Doclet
-    <tr><td>ExecutableMemberDoc<td>javax.lang.model.element.ExecutableElement
-    <tr><td>FieldDoc<td>javax.lang.model.element.VariableElement
-    <tr><td>LanguageVersion<td>javax.lang.model.SourceVersion
-    <tr><td>MemberDoc<td>javax.lang.model.element.Element
-    <tr><td>MethodDoc<td>javax.lang.model.element.ExecutableElement
-    <tr><td>PackageDoc<td>javax.lang.model.element.PackageElement
-    <tr><td>Parameter<td>javax.lang.model.element.VariableElement
-    <tr><td>ParameterizedType<td>javax.lang.model.type.DeclaredType
-    <tr><td>ParamTag<td>com.sun.source.doctree.ParamTree
-    <tr><td>ProgramElementDoc<td>javax.lang.model.element.Element
-    <tr><td>RootDoc<td>jdk.javadoc.doclet.DocletEnvironment
-    <tr><td>SeeTag<td>com.sun.source.doctree.LinkTree<br>com.sun.source.doctree.SeeTree
-    <tr><td>SerialFieldTag<td>com.sun.source.doctree.SerialFieldTree
-    <tr><td>SourcePosition<td>com.sun.source.util.SourcePositions
-    <tr><td>Tag<td>com.sun.source.doctree.DocTree
-    <tr><td>ThrowsTag<td>com.sun.source.doctree.ThrowsTree
-    <tr><td>Type<td>javax.lang.model.type.Type
-    <tr><td>TypeVariable<td>javax.lang.model.type.TypeVariable
-    <tr><td>WildcardType<td>javax.lang.model.type.WildcardType
+ * <table class="striped">
+ *   <caption>Guide for mapping old types to new types</caption>
+ *   <thead>
+ *     <tr><th scope="col">Old Type<th scope="col">New Type
+ *   </thead>
+ *   <tbody style="text-align:left">
+ *     <tr><th scope="row">{@code AnnotatedType}            <td>{@link javax.lang.model.type.TypeMirror javax.lang.model.type.TypeMirror}
+ *     <tr><th scope="row">{@code AnnotationDesc}           <td>{@link javax.lang.model.element.AnnotationMirror javax.lang.model.element.AnnotationMirror}
+ *     <tr><th scope="row">{@code AnnotationDesc.ElementValuePair}<td>{@link javax.lang.model.element.AnnotationValue javax.lang.model.element.AnnotationValue}
+ *     <tr><th scope="row">{@code AnnotationTypeDoc}        <td>{@link javax.lang.model.element.TypeElement javax.lang.model.element.TypeElement}
+ *     <tr><th scope="row">{@code AnnotationTypeElementDoc} <td>{@link javax.lang.model.element.ExecutableElement javax.lang.model.element.ExecutableElement}
+ *     <tr><th scope="row">{@code AnnotationValue}          <td>{@link javax.lang.model.element.AnnotationValue javax.lang.model.element.AnnotationValue}
+ *     <tr><th scope="row">{@code ClassDoc}                 <td>{@link javax.lang.model.element.TypeElement javax.lang.model.element.TypeElement}
+ *     <tr><th scope="row">{@code ConstructorDoc}           <td>{@link javax.lang.model.element.ExecutableElement javax.lang.model.element.ExecutableElement}
+ *     <tr><th scope="row">{@code Doc}                      <td>{@link javax.lang.model.element.Element javax.lang.model.element.Element}
+ *     <tr><th scope="row">{@code DocErrorReporter}         <td>{@link jdk.javadoc.doclet.Reporter jdk.javadoc.doclet.Reporter}
+ *     <tr><th scope="row">{@code Doclet}                   <td>{@link jdk.javadoc.doclet.Doclet jdk.javadoc.doclet.Doclet}
+ *     <tr><th scope="row">{@code ExecutableMemberDoc}      <td>{@link javax.lang.model.element.ExecutableElement javax.lang.model.element.ExecutableElement}
+ *     <tr><th scope="row">{@code FieldDoc}                 <td>{@link javax.lang.model.element.VariableElement javax.lang.model.element.VariableElement}
+ *     <tr><th scope="row">{@code LanguageVersion}          <td>{@link javax.lang.model.SourceVersion javax.lang.model.SourceVersion}
+ *     <tr><th scope="row">{@code MemberDoc}                <td>{@link javax.lang.model.element.Element javax.lang.model.element.Element}
+ *     <tr><th scope="row">{@code MethodDoc}                <td>{@link javax.lang.model.element.ExecutableElement javax.lang.model.element.ExecutableElement}
+ *     <tr><th scope="row">{@code PackageDoc}               <td>{@link javax.lang.model.element.PackageElement javax.lang.model.element.PackageElement}
+ *     <tr><th scope="row">{@code Parameter}                <td>{@link javax.lang.model.element.VariableElement javax.lang.model.element.VariableElement}
+ *     <tr><th scope="row">{@code ParameterizedType}        <td>{@link javax.lang.model.type.DeclaredType javax.lang.model.type.DeclaredType}
+ *     <tr><th scope="row">{@code ParamTag}                 <td>{@link com.sun.source.doctree.ParamTree com.sun.source.doctree.ParamTree}
+ *     <tr><th scope="row">{@code ProgramElementDoc}        <td>{@link javax.lang.model.element.Element javax.lang.model.element.Element}
+ *     <tr><th scope="row">{@code RootDoc}                  <td>{@link jdk.javadoc.doclet.DocletEnvironment jdk.javadoc.doclet.DocletEnvironment}
+ *     <tr><th scope="row">{@code SeeTag}                   <td>{@link com.sun.source.doctree.LinkTree com.sun.source.doctree.LinkTree}<br>
+ *                                                              {@link com.sun.source.doctree.SeeTree com.sun.source.doctree.SeeTree}
+ *     <tr><th scope="row">{@code SerialFieldTag}           <td>{@link com.sun.source.doctree.SerialFieldTree com.sun.source.doctree.SerialFieldTree}
+ *     <tr><th scope="row">{@code SourcePosition}           <td>{@link com.sun.source.util.SourcePositions com.sun.source.util.SourcePositions}
+ *     <tr><th scope="row">{@code Tag}                      <td>{@link com.sun.source.doctree.DocTree com.sun.source.doctree.DocTree}
+ *     <tr><th scope="row">{@code ThrowsTag}                <td>{@link com.sun.source.doctree.ThrowsTree com.sun.source.doctree.ThrowsTree}
+ *     <tr><th scope="row">{@code Type}                     <td>{@link javax.lang.model.type.TypeMirror javax.lang.model.type.TypeMirror}
+ *     <tr><th scope="row">{@code TypeVariable}             <td>{@link javax.lang.model.type.TypeVariable javax.lang.model.type.TypeVariable}
+ *     <tr><th scope="row">{@code WildcardType}             <td>{@link javax.lang.model.type.WildcardType javax.lang.model.type.WildcardType}
+ *   </tbody>
  * </table>
  *
  * @see jdk.javadoc.doclet.Doclet