1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-19 08:52:15 +01:00

Add boarders to the teble items so screen readers will read while walking through the table

This commit is contained in:
Joe Wegner 2019-09-27 10:29:19 -04:00
parent 09e420245b
commit b9265a42b1
2 changed files with 8 additions and 14 deletions

View File

@ -3,21 +3,12 @@ package cc.arduino.contributions.libraries.ui;
import static processing.app.I18n.format;
import static processing.app.I18n.tr;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.*;
import java.util.Optional;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JTextPane;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.border.TitledBorder;
import javax.swing.event.HyperlinkEvent;
import javax.swing.text.Document;
import javax.swing.text.html.HTMLDocument;
@ -128,6 +119,9 @@ public class ContributedLibraryTableCellJPanel extends JPanel {
return;
ContributedLibrary selected = releases.getSelected();
TitledBorder titledBorder = BorderFactory.createTitledBorder(selected.getName());
titledBorder.setTitleFont(getFont().deriveFont(Font.BOLD));
setBorder(titledBorder);
Optional<ContributedLibrary> mayInstalled = releases.getInstalled();
boolean installable, upgradable;

View File

@ -189,7 +189,7 @@ public class ContributedPlatformTableCellJPanel extends JPanel {
ContributedPlatform selected = releases.getSelected();
TitledBorder titledBorder = BorderFactory.createTitledBorder(selected.getName());
titledBorder.setTitleFont(getFont().deriveFont(Font.BOLD));
this.setBorder(titledBorder);
setBorder(titledBorder);
ContributedPlatform installed = releases.getInstalled();
boolean removable, installable, upgradable;
@ -215,7 +215,7 @@ public class ContributedPlatformTableCellJPanel extends JPanel {
removeButtonPlaceholder.setVisible(!removable);
String desc = "<html><body>";
// desc += "<b>" + selected.getName() + "</b>";
desc += "<b>" + selected.getName() + "</b>";
if (installed != null && installed.isBuiltIn()) {
desc += " Built-In ";
}