Unsure about the consequences for accessibility but adding the following helps, because it excludes ProseMirror descendants from receiving aria-hidden
. This only works if you’re directly or indirectly using GitHub - theKashey/aria-hidden: 🗣Cast aria-hidden to everything, except....
new Plugin({
props: {
attributes: {
'aria-live': 'polite',
},
},
}),
I was debugging why I only noticed a domObserver issue with aria-hidden when I had a CodeMirror node view. It’s because it has a cm-announced
which has aria-live
set, so the library aria-hidden
marks all of its surrounding siblings as hidden instead of its parent or an ancestor – and that in turn, causes a bunch of mutation records.
Similar issue:
Ideally, we could define an ignoreMutation
at the root node view or passed to EditorView, that’s used in the domObserver and can filter out these third-party libraries.