Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New AccessKit feature: Alt text reminder #783

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Oct 7, 2022

User-facing changes

  • Adds an AccessKit feature that highlights the alt text button in the post form on images that don't have user-set alt text.

I pretty much always post a post, look at the post on my dash, and go, "ah, right, alt text" and add it. Sometimes the post has already been reblogged by then, at which point it's too late.

Technical explanation

Creates its own MutationObserver, due to the need for attributeFilter: ['alt']; when you add alt text to an image in the beta post editor React is smart and only updates the attribute.

Issues this closes

@AprilSylph
Copy link
Owner

I should pitch this to be added to the editor proper. We're likely not going to add anything else to that meatballs menu, so a dedicated ALT button that calls attention to itself when there's no image description just... makes sense.

@marcustyphoon
Copy link
Collaborator Author

rubs hands together Excellent, my master plan is proceeding as I have foretold! (Basically.)

@marcustyphoon marcustyphoon marked this pull request as draft March 5, 2023 22:58
@marcustyphoon marcustyphoon marked this pull request as ready for review August 2, 2023 12:29
@marcustyphoon marcustyphoon marked this pull request as draft March 24, 2024 10:53
@marcustyphoon
Copy link
Collaborator Author

Note: This can take advantage of :has() and become a single stylesheet.

@marcustyphoon
Copy link
Collaborator Author

Fun fact: At time of posting, the default alt text of an image added to the editor when the UI language is set to spanish is lowercase. window.tumblr.languageData doesn't have this variation, as the same key ("Image") corresponds to both case variations ("Imagen" / "imagen") and of course a javascript key-value object can only have one of them.

@marcustyphoon marcustyphoon marked this pull request as ready for review June 22, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants