- Issue created by @thomas.frobieter
- π©πͺGermany Anybody Porta Westfalica
Here's a similar, more generic issue: β¨ Add an "opt-in" mode per page (e.g. for Themers) Active that keeps Editorally available, but doesn't scan and modify the pages on load, but on user click.
I think both issues target a similar issue, but the solutions might be combined. The idea for an individual setting in the user profile (2) here might extend the other one, which might be a bit more generic.
- πΊπΈUnited States itmaybejj
I...don't plan to contribute my own time to this -- if it's modifying inline DOM (other than the toggle), there's presumably a problem on the page. And if that is breaking a component, the themer needs to account for it, since it will break it for front-end editors. And if the toggle is in their way, it's going to be in the editors' way too. So I don't let our themers turn it off; I want them to be putting as much thought into the editor UI as the frontend.
As of the latest release they can hide all duplicates of a manual check on a page for themselves. They could also split out their account to a role that does not have the checker enabled. Or they could temporarily add
.ed11y-element {display: none;}
to the CSS...assuming they don't accidentally commit the change...Or they could throw this in dev JS to let them modify anything for themself at runtime, ideally wrapped in an
if
fordrupalSettings.user.uid
:// Tell Editoria11y to call our option override. var editoria11yOptionsOverride = true; var editoria11yOptions = function (parameterBag) { let options = parameterBag; // Dev approach 1: do not draw interface at all. // This overrides the GUI config for "Disable the scanner if these elements are detected." options['preventCheckingIfPresent'] = '.some-devel-button-that-only-themers-see'; // Dev approach 2: ignore config and force polite mode. options['alertMode'] = 'polite'; // Override any 'assertive' config. options['userPrefersShut'] = true; // Override localStorage for open/closed state. // Dev approach 3: only run on click: options['ignoreAllIfPresent'] = '.some-devel-button-that-only-themers-see'; // That's a library param that isn't in the GUI, the opposite of the GUI one: // "Hide all alerts if none of these elements are present." return options; }
If they are the only themer on the project, they could also just add ".some-devel-button-only-themers-see" to the GUI config for "Disable the scanner if these elements are detected."
Mostly...I just philosophically do not think putting something in the GUI that lets end-users to turn the checker on and off is a good idea; this is one of the key differentiators between Sa11y and Editoria11y. Sa11y allows more local-user control, Editoria11y is centrally managed. I found that users who could turn things off, did. And then they forgot to turn things back on.
I would consider a merge request if it let the admins control who was able to do this.