From ab48c89bd3960c6ded7b9adfaaa96c0a3db7172a Mon Sep 17 00:00:00 2001 From: "Sean S. LeBlanc" Date: Sat, 4 Dec 2021 04:53:41 -0500 Subject: [PATCH] feat(a11y): make name text accessible --- src/gui/elements/NameBox.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/elements/NameBox.ts b/src/gui/elements/NameBox.ts index 5bf0f208..1fdc1717 100644 --- a/src/gui/elements/NameBox.ts +++ b/src/gui/elements/NameBox.ts @@ -36,6 +36,7 @@ export default class NameBox extends Sprite { } async show(text: string,color: string): Promise { + this.game.accessibility.name(text); this.text.setText(text, true); this.text.updateTransform(); if (this.config.tintStyle === 'box'){ @@ -50,6 +51,7 @@ export default class NameBox extends Sprite { } async hide(transitionName?: string): Promise{ + this.game.accessibility.name(); if (!this.visible) return; if (!transitionName) transitionName = this.config.transition; const transition = this.game.screenEffects.transition.get(transitionName);