Accessibility: Change Multiple Spaces to Single Space #1230
Replies: 3 comments 4 replies
-
I had no idea multiple spaces in a post was an issue! Should I tag this post with eye strain, just in case? |
Beta Was this translation helpful? Give feedback.
-
I would believe something like this is definitely a feasible addition. Within the XKit framework, instead of checking all of the text notes in the document, there are utilities that would allow instead having the |
Beta Was this translation helpful? Give feedback.
-
Quick notes for your script: You can probably just process text inside
This loop is unnecessary if you're processing the whole document on every mutation: const observer = new MutationObserver(function(mutationsList) {
- for (const mutation of mutationsList) {
if (!isPostEditorOpen()) {
fixTextSpaces();
}
- }
}); You can replace Note that this will still fail if a double space falls on an edit boundary, i.e. |
Beta Was this translation helpful? Give feedback.
-
I've been trying to find a solution for this when people use multiple spaces in their text for aesthetics - besides asking people to not use multiple spaces between every word and/or to tag for "eye strain cw" if they or someone they reblog from does, but people forget all the time, which is not helpful when someone's choice of aesthetic can trigger migraines or cause other issues for other people - but I'm struggling to get things to work properly myself.
I've successfully figured out how to get a userscript to replace the spacing itself. The problem arises when beyond that, there's things with tumblr's coding that exceed my coding knowledge to have any idea how to work around, such as when people use shift+enter to create new line breaks within a paragraph block, the script isn't able to recognise the line break as such, and so everything becomes one large block of text (not ideal for lists and such). That much could be tolerated, probably, though annoying.
WITHOUT SCRIPT RUNNING:
WITH SCRIPT RUNNING:
The biggest issue if getting it to not affect the post editor, as it causes the options menus for adding media and handling format to blink in and out of existence when trying to edit a post. The 'quick and dirty' solution is obviously to simply exclude the drafts page itself from the script, since excluding the urls for the post editor don't seem to work as a workaround.
This is what I currently have worked out, if it helps give a better idea of what I'm talking about.
I know I'm not the only one would benefit from something like this, as there are plenty of PSA posts floating around regarding the issue with notes of the aesthetic being difficult for people with migraines, vision impairment, attention disorders, dyslexia, etc., and while I'm not picky as to whether it's a feature through XKit or simply as a userscript, I suspect it would be easier for many people if it were available through XKit if it's possible.
Is it feasible for something akin to this to be added as part of the accessibility options?
Beta Was this translation helpful? Give feedback.
All reactions