1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

Merge pull request #9145 from joew46167/master

Add in accessibility support for screen readers in board and library managers
This commit is contained in:
Martino Facchin 2019-08-19 11:16:06 +02:00 committed by GitHub
commit c3fdb10244
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}
}
}