Skip to content

Commit 35bdb18

Browse files
committed
addressed pr feedback
1 parent ab1d017 commit 35bdb18

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/blockly/core/utils/dom.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Former goog.module ID: Blockly.utils.dom
88

99
import * 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
}

packages/blockly/tests/mocha/utils_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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', {});

0 commit comments

Comments
 (0)