Add text-editor-element-spec and fix handling of focus and attributes