Skip to content

Commit 46ac410

Browse files
authored
fix: dont show workspace count on apple devices (#9939)
* fix: dont show workspace count on apple devices * chore: format msg
1 parent 5d1097e commit 46ac410

4 files changed

Lines changed: 632 additions & 616 deletions

File tree

packages/blockly/core/workspace_svg.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,17 @@ export class WorkspaceSvg
745745
* Updates the label on the workspace to reflect the number of top-level stacks in the workspace.
746746
*/
747747
private updateAriaLabel() {
748+
if (userAgent.APPLE) {
749+
// VoiceOver is reading this label inappropriately, so don't show the
750+
// stack count because it might be inaccurate.
751+
// https://github.com/RaspberryPiFoundation/blockly/issues/9885
752+
aria.setState(
753+
this.svgGroup_,
754+
aria.State.LABEL,
755+
Msg['WORKSPACE_LABEL_PLAIN'],
756+
);
757+
return;
758+
}
748759
const numStacks = this.getTopBlocks(false).length;
749760
if (numStacks == 1) {
750761
aria.setState(

0 commit comments

Comments
 (0)