Skip to content

Add in accessibility support for screen readers in board and library managers #9145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value,

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ void update(JTable parentTable, Object value, boolean isSelected,

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

}