<AWT Dev> <Swing Dev>  Review Request: 8225372 accessibility errors in tables in java.desktop files
Sergey.Bylokhov at oracle.com
Tue Jul 2 00:19:20 UTC 2019
Thank you for review, the new version is here:
See comments inline:
On 14/06/2019 09:19, Alexey Ivanov wrote:
> 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.
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.
> I'm still unsure we should suppress rendering <th> in bold, should we not?
I changed the code to use default style as-is.
> 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.
> 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.
> 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:
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.
> 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.
> It would suggest more semantic mark-up for "Example" (lines 39–44):
> <p><img ...>
> instead of changing only text presentation by ‘font-weight: bold’ property on <div> element.
> This is applicable to other similar cases.
> <b>  has new semantics since HTML5; <strong>  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.
>  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b
>  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong
> 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:
>> 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:
>> - The tables which are used for a layout were replaced by the <div>.(In fact, this is just emulation of <figure>):
>> - 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:
>> - 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:
>> - In some cases I have dropped the table, and replace it by the list of elements:
>> 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:
>> 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.
More information about the awt-dev