prosemirror-view 1.23.8 → 1.23.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.23.9 (2022-03-11)
2
+
3
+ ### Bug fixes
4
+
5
+ Make sure screen readers don't read the `<img>` nodes added as kludge for cursor behavior.
6
+
1
7
  ## 1.23.8 (2022-03-10)
2
8
 
3
9
  ### Bug fixes
package/dist/index.es.js CHANGED
@@ -1924,7 +1924,10 @@ ViewTreeUpdater.prototype.addHackNode = function addHackNode (nodeName) {
1924
1924
  this.index++;
1925
1925
  } else {
1926
1926
  var dom = document.createElement(nodeName);
1927
- if (nodeName == "IMG") { dom.className = "ProseMirror-separator"; }
1927
+ if (nodeName == "IMG") {
1928
+ dom.className = "ProseMirror-separator";
1929
+ dom.alt = "";
1930
+ }
1928
1931
  if (nodeName == "BR") { dom.className = "ProseMirror-trailingBreak"; }
1929
1932
  this.top.children.splice(this.index++, 0, new TrailingHackViewDesc(this.top, nothing, dom, null));
1930
1933
  this.changed = true;
@@ -5284,6 +5287,7 @@ function updateCursorWrapper(view) {
5284
5287
  var dom = document.createElement("img");
5285
5288
  dom.className = "ProseMirror-separator";
5286
5289
  dom.setAttribute("mark-placeholder", "true");
5290
+ dom.setAttribute("alt", "");
5287
5291
  view.cursorWrapper = {dom: dom, deco: Decoration.widget(view.state.selection.head, dom, {raw: true, marks: view.markCursor})};
5288
5292
  } else {
5289
5293
  view.cursorWrapper = null;