RFR: [15]JDK-8247955,doclint: don't complain about summary/caption when role=presentation
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Jun 23 00:09:35 UTC 2020
Hi Pavel,
Thanks for the comments/questions.
On 6/22/20 6:17 AM, Pavel Rappo wrote:
> Jon,
>
> 1. Should we refine this wording to reflect the change?
>
> dc.no.summary.or.caption.for.table=no summary or caption for table
This is substandard legacy use of HTML tables. I prefer not to do more
work than is necessary to provide minimal support. I also don't think
we should advertise or encourage the use of role="presentation". For
the one use case in the JDK docs, it would arguably be better to use a
list and some CSS, but since what is there is technically legal, I
thought I would let it pass.
>
> 2. Does it make sense to test all the possibilities? Currently our tests cover 50% of that space.
>
> tested|caption|summary|role
> ----------------------------
> + + +
> + + -
> + - +
> + + - -
> - + +
> + - + -
> + - - +
> + - - -
See answer to #1.
>
> ***
>
> I was surprised by
>
> Objects.equals(v, "presentation")
>
> I guess, I was expecting a more familiar
>
> "presentation".equals(v).
>
> But there's nothing wrong with using Objects.equals.
I have never, ever liked the backwards form of
<object>.equals(<subject>) just as a lazy way of avoiding a null check.
It's up there with C-array syntax (int foo[]) as one of those reasons
why I prefer to code in Java, for clarity, not in C, for obscurity.
You're lucky that I used the modern new-fangled API Objects.equals, as
compared to the Good Old Days, if (a != null && a.equals(b)) ...
-- Jon
>
> -Pavel
>
>> On 20 Jun 2020, at 03:40, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
>>
>> Please review a small adjustment for doclint: to suppress the check for
>> a table having a caption when the table has `role=presentation`.
>>
>> There's an existing AccessibilityTest.java, but that is still focussed on
>> HTML 4, which does not support role=presentation. So, a new test
>> is added (for now) that is focussed on this test case, in HTML 5.
>> When we drop support for HTML 4, we should merge the two files.
>>
>> -- Jon
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8247955
>> Webrev: http://cr.openjdk.java.net/~jjg/8247955/webrev.00/
>>
More information about the javadoc-dev
mailing list