eschafer / twitter-visible-alt-text

Firefox add-on that makes Twitter alt text visible to sighted users

Home Page:https://addons.mozilla.org/en-US/firefox/addon/twitter-visible-alt-text/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple image navigation doesn't work

MArnaldos opened this issue · comments

When clicking in an image where the tweet contains two or more images, both with no alt text, opening the first works but navigating between images doesn't, with twitter giving back as message "Something went wrong. Try reloading."

Disabling this add on made it work fine. Re enabling broke it again.

I'm getting this issue even when there's just a single image. Debugging it a little:

  • the query selector finds the image in the larger image overlay pane correctly
  • it also finds the original tweet's image
> nodes = document.querySelectorAll('img[alt]:not([alt=""]):not([src^="https://abs-0.twimg.com/emoji/"]):not([src^="https://pbs.twimg.com/profile_images/"]), video')
NodeList [ img.css-9pa8cd, img.css-9pa8cd ]

Running the code manually on an image, there's some CSS issue that's causing the added div tags not to display. But a deeper issue is something in Twitter's JS: if I sit on the page for long enough, the image vanishes and turns into the 'retry' button.

All of which is to say: there's some nasty interaction here. 😢