On Tue, 30 Jul 2024 17:50:43 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTag.java line 87: >> >>> 85: attrs(AttrKind.HTML4, CLEAR)), >>> 86: >>> 87: BUTTON(BlockType.OTHER, EndKind.REQUIRED, >> >> Several tag constants that use `BlockType.OTHER` in this enum are defined as >> [Phrasing Content](https://html.spec.whatwg.org/#phrasing-content) in the >> HTML5 spec. Since HTML5 phrasing content roughly corresponds to pre-HTML5 >> inline content these tags should use `BlockType.INLINE` here. This includes >> the following tags: >> >> - BUTTON >> - INPUT >> - LABEL >> - LINK >> - SCRIPT >> >> These tags were also flagged as `phrasingContent` in the old doclet >> `TagName` enum. I'm not sure whether marking it as `INLINE` content will >> break DocLint tests. >> >> It would seem like a good idea to suggest using [HTML5 content >> categories](https://developer.mozilla.org/en-US/docs/Web/HTML/Content_categories) >> in the new merged code, but the new categories are more complex and >> overlapping, and don't include list and table content, so there is not a lot >> to gain besides maybe more up-to-date terminology. > > I'll look to upgrade these. In the original impl of DocLint, it was something > of a conscious decision to avoid supporting input elements. > > I'm surprised LINK is phrasing content: I thought it could only appear in > HEAD elements. I will check. > > Generally, moving towards HTML 5 names is a good goal, but some of that > could/should be part of a DocLint cleanup. This is primarily just a merge, > not an upgrade. And, while DocLint is intended to be helpful, it is > specifically for doc comments and their likely content, and not a full > conformance checker. I see LINK can be phrasing content under certain conditions. I'll adjust the enum accordingly, but I do not think it worth updating DocLint at this time to do any additional checking. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19916#discussion_r1697369859