Codemirror and CodeEditor both currently provide buttons to toggle state in the editor. These buttons use setActive to change the style, but don't actually reflect this state in the HTML dom, meaning there is no state provided to screenreaders.
CodeMirror has a kludge around this, see also T197534
A better solution seems wise