mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +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:
commit
c3fdb10244
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user