RFR: 8350260: Improve HTML instruction formatting in PassFailJFrame
Alexey Ivanov
aivanov at openjdk.org
Tue Feb 18 11:52:22 UTC 2025
**Problem:**
When instructions are long, the formatting in `PassFailJFrame` looks off:
1. When the instructions are displayed on the screen for the first time, the HTML is scrolled to the bottom, which isn't convenient;
2. Numbers above 10 in the list are clipped on the left;
3. No border around the HTML text.
These problems were found while converting the instructions for `test/jdk/javax/accessibility/TestJCheckBoxToggleAccessibility.java` in https://github.com/openjdk/jdk/pull/23436.
<details>
<summary>Screenshots of the instructions</summary>
The instructions are scrolled to the bottom when the test starts:

The number 10 in the list is clipped on the left:

The headings _“Testing with…”_ are flushed to the left, there's no additional space between the scroll pane border and the text.
</details>
**Fix:**
1. Adjust the list margins to accommodate for longer text;
2. Install the text border to either text instruction component;
3. Scroll the text to the top.
<details>
<summary>Screenshot of the instructions <i>with the fix</i></summary>
The stated issues are resolved:

</details>
-------------
Commit messages:
- 8350260: Improve HTML instruction formatting in PassFailJFrame
Changes: https://git.openjdk.org/jdk/pull/23674/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23674&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8350260
Stats: 7 lines in 1 file changed: 2 ins; 1 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/23674.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23674/head:pull/23674
PR: https://git.openjdk.org/jdk/pull/23674
More information about the client-libs-dev
mailing list