<AWT Dev> <Swing Dev>  Review Request: 8225372 accessibility errors in tables in java.desktop files
alexey.ivanov at oracle.com
Tue Sep 3 17:55:04 UTC 2019
Sorry for my belated reply.
Please see my comments inline:
On 03/08/2019 00:56, Sergey Bylokhov wrote:
> The accessibility checker found similar issues in the private methods in java.awt.geom.Path2D class. The spec for these methods is exposed via serialization form.
Path2D.java looks fine to me.
> So we need to fix it as well:
> ----- Sergey.Bylokhov at oracle.com wrote:
>> Hi, Alexey.
>> Thank you for review, the new version is here:
>> Fix: http://cr.openjdk.java.net/~serb/8225372/webrev.01
>> 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
>> We can:
>> But I am not sure that it looks better due to the current default
>> styles for nested <li>
It looks fine to me. And it has more semantic markup.
For more visual distinction, we can add style="list-style-type: circle"
to all the nested <ul> elements, or use ‘square’ type. Alternatively,
it's possible to modify the style of the outer <ul> element, the nested
<ul>'s are still rendered with ‘disc’ type.
There are several text passages that aren't part of paragraph. I'm not
sure if “orphaned” text should be put into a <p>.
The markup for Figure 2 and 3 can be simplified, especially if the image
headers are dropped.
There's *an error* in ‘alt’ attribute for Figure 2 and 3: the images are
referred to as Figures 1 and 2 correspondingly.
>>> 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.
These changes look good. Thanks for cleaning this up across the entire
>>> 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
>> 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.
Yes, it will look similar to how it looks at the moment. Yet the markup
will be more semantic without presentation table. In fact, I went ahead
and re-done the markup of examples:
I find it clearer even when viewing visually. Each example is separated
from others. If anchors are added, it will be possible to link to an
I used Narrator in Windows 10 to read the examples. I admit it's hard
for me to judge objectively, however, the headers make the page easier
to navigate and to understand where the next example starts.
There's a little inconsistency in the examples: at times quotes are
used, at other times they aren't. Shall the quotes be dropped?
Another issue is that Modality.html extensively uses <u> element .
This element was deprecated in HTML 4; it was restored with HTML 5 with
new semantic. I strongly believe the usage of <u> in this document does
not correspond to the element semantics . I think it should be
replaced with <mark> “to mark key words or phrases” or <i> “to denote
technical terms…” which better correspond to the usage on this page.
Definitely, this issue should be addressed separately from this one. The
entire desktop module should be analysed and cleaned of <u> where it's
used for presentational purposes only. (The same is true for <b> and <i>
>>> 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.
Well, I think the additional column adds noise when it's read by
Narrator. I cannot see any scenario where the index column could be useful.
At the same time, I don't mind adding the Index column if everyone
agrees it's the way to go. However, fixing the checker still seems like
a better option. As another option, the first column could be the header
of the row.
>>> 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
>>> 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.
The tables of properties have no <thead> element. Their header row
should be inside <thead> element; the start of <tbody> should be moved
below the closing of </thead>.
>>> 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
More information about the awt-dev