File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ import {Rect} from './utils/rect.js';
6767import { Svg } from './utils/svg.js' ;
6868import * as svgMath from './utils/svg_math.js' ;
6969import { FlyoutItemInfo } from './utils/toolbox.js' ;
70+ import * as userAgent from './utils/useragent.js' ;
7071import type { Workspace } from './workspace.js' ;
7172import type { WorkspaceSvg } from './workspace_svg.js' ;
7273
@@ -2020,11 +2021,13 @@ export class BlockSvg
20202021 fullBlockField . recomputeAriaContext ( ) ;
20212022 return ;
20222023 }
2023- aria . setState (
2024- this . getFocusableElement ( ) ,
2025- aria . State . LABEL ,
2026- this . getAriaLabel ( aria . Verbosity . STANDARD ) ,
2027- ) ;
2024+ let label = this . getAriaLabel ( aria . Verbosity . STANDARD ) ;
2025+ // VoiceOver inserts a comma between aria-label and aria-roledescription.
2026+ // Specific screen readers are not detectable, so OS is used as a proxy.
2027+ if ( label && ! userAgent . APPLE && ! label . endsWith ( ',' ) ) {
2028+ label += ',' ;
2029+ }
2030+ aria . setState ( this . getFocusableElement ( ) , aria . State . LABEL , label ) ;
20282031 configureAriaRole ( this ) ;
20292032 }
20302033
You can’t perform that action at this time.
0 commit comments