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:
parent
452ac63200
commit
6bcd0529c1
@ -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…
x
Reference in New Issue
Block a user