mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Let screen readers recognize tapped status.
This commit is contained in:
@@ -890,7 +890,14 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
|
||||
|
||||
// Card name overlay
|
||||
titleText.setText(CardTranslation.getTranslatedName(card.getCurrentState().getName()));
|
||||
|
||||
// Screen readers can't tell if a card is tapped.
|
||||
if (isPreferenceEnabled(FPref.UI_SR_OPTIMIZE)) {
|
||||
if (this.isTapped()) {
|
||||
titleText.getAccessibleContext().setAccessibleDescription("tapped");
|
||||
} else {
|
||||
titleText.getAccessibleContext().setAccessibleDescription("");
|
||||
}
|
||||
}
|
||||
final int damage = card.getDamage();
|
||||
damageText.setText(damage > 0 ? "\u00BB " + damage + " \u00AB" : "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user