Skip to content

Enable alert when no alt text is found #14

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gdog2u
Copy link

@gdog2u gdog2u commented Jul 12, 2023

The function noAltFound couldn't run due to being ran from the extension's context instead of the tab's. I've moved the noAltFound function to /content_scripts/getClickTarget.js, and replaced its contents in /menu.js with a sendMessage call to call it in the tab.

The function noAltFound couldn't run due to being ran from the
extension's context instead of the tab's. Moved the noAltFound function
to getClickTarget.js, and replaced its contents in menu.js with a
sendMessage call to call it in the tab.
@hkolbeck
Copy link
Member

There's definitely some maintenance to be done here, I apologize for leaving it to get so stale.

Revisiting things, I don't think I want to alert on no alt found, only because it pops a message that has to be manually dismissed. That said, the lack of any working indication that no alt text was found is a major oversight on my part, and I deeply appreciate your work. I think the route I'd like to take is to pop up an in-page notification of some kind.

I am currently deeply embroiled in getting a much larger project off the ground: https://alt-text.org. If you're willing to take this on it would be deeply appreciated, though I reserve the right to make additional changes before release. If not, which is wholly understandable, I may need an escape from networking to a nice, comfortable, programming problem in the next few weeks, and this is a prime candidate.

Thank you, and I'll leave this open for now.

@gdog2u
Copy link
Author

gdog2u commented Jul 13, 2023

Thank you for the kind response. I realized this may be the case when I submitted the PR, but didn't mention it to avoid hindering my chances of it getting accepted 😅

I'll keep working on it, and see if I can get something more inline with what I think you have in mind.

@hkolbeck
Copy link
Member

I'm wavering a bit on a desire to make things even more complicated. Namely, even with a "nothing copied" indicator, if something was found you're still looking at pasting it without knowing its contents. I think the answer might be having the popup contain the alt text if found, with an automated fade after a short time that's kept in place if the mouse is hovered or focus is maintained. The move to a popup also opens an accessibility issue, as that popup needs to be focused, read, then focus returned to the image if it hasn't been shifted already. That's increasingly complex work, which I don't want to shove onto your plate. Help accepted, but none expected.

@hkolbeck
Copy link
Member

Backtracking, someone using a screen reader is already interacting directly with the alt text. Making sure the text scales with page text is crucial, but an explicit focus change I don't think is.

@hkolbeck
Copy link
Member

One proviso as well: A major failing point of this plugin at the moment is that it looks only for alt attributes, it really needs to check for aria-labels as well, but that can involve some tree walking, which can get messy. I'd like to fix that before a release.

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