Skip to content

Commit a854b46

Browse files
author
Luis Morales-Navarro
committed
fix regex in element names
1 parent bb4ba44 commit a854b46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/accessibility/describe.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ p5.prototype.describeElement = function(name, text, display) {
168168
//calls function that adds punctuation for better screen reading
169169
let elementName = _elementName(name);
170170
//remove any special characters from name to use it as html id
171-
name = name.replace(/[^a-zA-Z0-9 ]/g, '');
171+
name = name.replace(/[^a-zA-Z0-9]/g, '');
172+
172173
//store element description
173174
let inner = `<th scope="row">${elementName}</th><td>${text}</td>`;
174175
//if there is no dummyDOM

0 commit comments

Comments
 (0)