1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

Add in accessibility support for screen readers:

ContributedLibraryTableCellJPanel.java: Add description to accessibility context
   ContributedPlatformTableCellJPanel.java: Add description to accessibility context

   ProgressJProgressBar.java:
      Add status to accessibility context
      make progress bar focusable so screen reader can access
This commit is contained in:
Joe Wegner 2019-08-15 07:14:08 -04:00
parent 452ac63200
commit 6bcd0529c1
3 changed files with 10 additions and 1 deletions

View File

@ -193,6 +193,8 @@ public class ContributedLibraryTableCellJPanel extends JPanel {
desc += "</body></html>";
description.setText(desc);
// copy description to accessibility context for screen readers to use
description.getAccessibleContext().setAccessibleDescription(desc);
description.setBackground(Color.WHITE);
// for modelToView to work, the text area has to be sized. It doesn't

View File

@ -230,6 +230,8 @@ public class ContributedPlatformTableCellJPanel extends JPanel {
desc += "</body></html>";
description.setText(desc);
// copy description to accessibility context for screen readers to use
description.getAccessibleContext().setAccessibleDescription(desc);
description.setBackground(Color.WHITE);
// for modelToView to work, the text area has to be sized. It doesn't

View File

@ -38,8 +38,13 @@ public class ProgressJProgressBar extends JProgressBar {
public void setValue(Progress p) {
setValue((int) p.getProgress());
if (p.getStatus() != null)
if (p.getStatus() != null) {
setString(p.getStatus());
// copy status to accessibility context for screen readers to use
getAccessibleContext().setAccessibleDescription(p.getStatus());
// make status focusable so screen readers can get to it
setFocusable(true);
}
}
}