Please review a moderately simple change to clean up the CSS class names and other minor details in the Table builder class.

Originally, the Table builder "just" built <table> elements.  As part of the work to better support ARIA, it was changed to create a <div> element that encloses the <table>, and (when necessary) a <div> element for the series of tabs.

Currently, the style provided and documented as the style class for the table is actually used for the outer <div> element, with no style class being set on the <table> itself.  The primary aspect of this change is to use a new/separate style class on the <table> element, and a standard style class on the inner <div> for the tablist.

In addition, the construction of the caption is unified within the Table builder, allowing us to delete an external method to create the caption. Related to that, the caption previously contained an invisible <span> with style class tab-end and just containing &nbsp;.  This invisible span has now been removed.

Finally, an /id/ for the tab panel was generated from style /class/ for the table, which was semantically questionable, since it assumed there would be only one such table on any page. This is fixed by requiring an id to be set on the table when there will be a tab panel.  In future, we may want to simply put an id on all tables created by the builder.

The "core" of the changes are in the Table class; the other changes in the src/ directory are just consequences of the changes to Table, and likewise the tests are updated to match.

I made some minor simplifications to the stylesheet, but most of the CSS for tables is sufficiently irregular that it warrants a separate follow-up changeset just to clean up the CSS for tables in the main stylesheet.  I also grouped and commented the styles for tables in the HtmlStyle class.

There should be no visible changes to the generated API docs.

-- Jon

JBS: https://bugs.openjdk.java.net/browse/JDK-8242649
Webrev: http://cr.openjdk.java.net/~jjg/8242649/webrev.00/index.html
API: http://cr.openjdk.java.net/~jjg/8242649/api.00/index.html


Reply via email to