File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77// Former goog.module ID: Blockly.utils.dom
88
99import * as aria from './aria.js' ;
10- import type { Svg } from './svg.js' ;
10+ import { Svg } from './svg.js' ;
1111
1212/**
1313 * Required name space for SVG elements.
@@ -61,10 +61,10 @@ export function createSvgElement<T extends SVGElement>(
6161 * For svg and group (g) elements, we set the role to generic so that they are ignored by assistive technologies.
6262 */
6363 if (
64- name === 'svg' ||
65- name === 'g' ||
66- e . tagName === 'svg' ||
67- e . tagName === 'g'
64+ name === Svg . SVG . toString ( ) ||
65+ name === Svg . G . toString ( ) ||
66+ e . tagName === Svg . SVG . toString ( ) ||
67+ e . tagName === Svg . G . toString ( )
6868 ) {
6969 aria . setRole ( e , aria . Role . GENERIC ) ;
7070 }
Original file line number Diff line number Diff line change @@ -446,7 +446,7 @@ suite('Utils', function () {
446446 } ) ;
447447 test ( 'svg elements of type svg have the generic role by default' , function ( ) {
448448 const svgSvg = Blockly . utils . dom . createSvgElement (
449- Blockly . utils . Svg . G ,
449+ Blockly . utils . Svg . SVG ,
450450 { } ,
451451 ) ;
452452 const svg = Blockly . utils . dom . createSvgElement ( 'svg' , { } ) ;
You can’t perform that action at this time.
0 commit comments