Hi, Alexey.
Thank you for review, the new version is here:
Fix: http://cr.openjdk.java.net/~serb/8225372/webrev.01
Doc:
http://cr.openjdk.java.net/~serb/8225372/docs.01/api/java.desktop/module-summary.html
See comments inline:
On 14/06/2019 09:19, Alexey Ivanov wrote:
*GridBagLayout.java*
Does it make sense to use nested lists for valid values> It could make the
presentation clearer rather than a paragraph followed by a list.
We can:
http://cr.openjdk.java.net/~serb/8225372/docs.01/api/java.desktop/java/awt/GridBagLayout.html
But I am not sure that it looks better due to the current default styles for nested
<li>
The value ‘center’ is invalid for ‘float’ property in CSS, so it must be removed,
including style attribute of <img> element.
I dropped all incorrect "float" attributes whenever possible.
*DesktopProperties.html*
I'm still unsure we should suppress rendering <th> in bold, should we not?
I changed the code to use default style as-is.
*Modality.html*
The table in examples could be replaced by a series of <ol style="float: left"> element with , followed by
<p style="float: left"><img ...></p>
Then goes <div style="clear: left"></div>.
I would probably add titles to the examples to make the distinction between the examples clearer. If
each example is preceded by <h3>Example #</h3>, then style="clear: left" can be
applied to it.
If this sounds reasonable, I can file a new bug to handle this. This way we'll
get rid of presentation table.
I think that the final result will be quite similar to the existing table?
We can change the order of columns, so the a11y tool will read the text of the
image(Example 1/Example 2/etc) and then the current description of the example.
http://cr.openjdk.java.net/~serb/8225372/docs.01/api/java.desktop/java/awt/doc-files/Modality.html
*NumericShaper.html*
The table has only one row group, so you have to add row groups:
<tbody> elements create the row group that will be associated with “Arabic” row
group header.
fixed.
*gif_metadata.html*
As you mention, some tables don't have meaningful row header. And it's not
required in this case.
Adding the additional index column which does not make the table clearer does not make
any sense to me. We already have column headers (yes, scope="col" should be
added), and that resolves the missing header problem, doesn't it?
See “Tables with one header” article in Web Accessibility Tutorial:
https://www.w3.org/WAI/tutorials/tables/one-header/#table-with-ambiguous-data
The current document checker requires both row and columns headers. We can fix the
checker, but I do not see an issue with "index", these tables look like a grid
which contains enumerated data.
*tiff_metadata.html*
Compression type headers should be in <thead> (lines 516–518) and other table content
in <tbody>
In case of Mapping the Standard Metadata Format to TIFF Native Image Metadata,
the first column could probably be the row header. I'm not sure.
I added index to all these tables, otherwise, the tables looks non-unified.
The extra row in this table, lines 869–872 could be removed completely.
Fixed.
*BoxLayout.java*
It would suggest more semantic mark-up for "Example" (lines 39–44):
<p><b>Example:</b>
<p><img ...>
instead of changing only text presentation by ‘font-weight: bold’ property on
<div> element.
This is applicable to other similar cases.
<b> [1] has new semantics since HTML5; <strong> [2] can also be used, however, in this case this snipped does not represent anything of certain importance.>
style attribute on <img> element has invalid value of ‘bottom’ for property ‘float’, so it must be removed.
Fixed.
[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b
[2] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong
*componentProperties.html*
The same as DesktopProperties.html: should we suppress rendering <th> in bold?
JFileChooser, JInternalFrame, JInternalFrameTitlePane, JProgressBar, JSlider,
JTabbedPane, Text Properties tables lack <thead> element around the header row.
Because of the style applied, the header row is not rendered in bold. So suppressing
bold rendering proved to be useful.
On 12/06/2019 06:29, Sergey Bylokhov wrote:
Hello.
Please review the fix for JDK 13.
Bug: https://bugs.openjdk.java.net/browse/JDK-8225372
Fix: http://cr.openjdk.java.net/~serb/8225372/webrev.00
Doc:
http://cr.openjdk.java.net/~serb/8225372/docs/api/java.desktop/module-summary.html
In the fix, some(most) of the issues which were reported by the accessibility
checker were fixed.
Changes description:
- In the simplest case, the "scope=col/row" attribute was added to the tables:
http://cr.openjdk.java.net/~serb/8225372/webrev.00/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/componentProperties.html.sdiff.html
- The tables which are used for a layout were replaced by the <div>.(In fact, this
is just emulation of <figure>):
http://cr.openjdk.java.net/~serb/8225372/webrev.00/src/java.desktop/share/classes/javax/swing/JScrollPane.java.sdiff.html
- Some tables do not have the meaningful cell to be row header, so I have added an
additional column "index" and use it cells as row header:
http://cr.openjdk.java.net/~serb/8225372/webrev.00/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/gif_metadata.html.sdiff.html
- In one place I have added a special role to the table "role=presentation"
because the table was used just for layout and its content can be read without
information about this table:
http://cr.openjdk.java.net/~serb/8225372/docs/api/java.desktop/java/awt/doc-files/Modality.html#Examples
- In some cases I have dropped the table, and replace it by the list of
elements:
http://cr.openjdk.java.net/~serb/8225372/webrev.00/src/java.desktop/share/classes/javax/print/attribute/standard/Finishings.java.sdiff.html
New:
http://cr.openjdk.java.net/~serb/8225372/docs/api/java.desktop/javax/print/attribute/standard/Finishings.html
Old:
https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/javax/print/attribute/standard/Finishings.html
Note that I cannot fix two reported issues:
Take a look to the "Common dialog" and "HTML Content of example above" on
the links below:
http://cr.openjdk.java.net/~serb/8225372/docs/api/java.desktop/javax/swing/JOptionPane.html
http://cr.openjdk.java.net/~serb/8225372/docs/api/java.desktop/javax/swing/text/html/HTMLDocument.html
I tried to mark these tables as "role=presentation" or "aria-hidden=true", but
it does not work because Javadoc tool generates HTML4 and these attributes are supported by the
HTML5.
--
Best regards, Sergey.