Skip to content

Commit

Permalink
feat(a11y): make name text accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
seleb committed Dec 4, 2021
1 parent 9569fd0 commit ab48c89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/elements/NameBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export default class NameBox extends Sprite {
}

async show(text: string,color: string): Promise<any> {
this.game.accessibility.name(text);
this.text.setText(text, true);
this.text.updateTransform();
if (this.config.tintStyle === 'box'){
Expand All @@ -50,6 +51,7 @@ export default class NameBox extends Sprite {
}

async hide(transitionName?: string): Promise<any>{
this.game.accessibility.name();
if (!this.visible) return;
if (!transitionName) transitionName = this.config.transition;
const transition = this.game.screenEffects.transition.get(transitionName);
Expand Down

0 comments on commit ab48c89

Please sign in to comment.