-
Notifications
You must be signed in to change notification settings - Fork 5
Don't allow empty alt attribute #33
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
Conversation
862b764 to
77d0225
Compare
77d0225 to
4311901
Compare
|
I will add tests in a follow-up, hopefully soon. |
|
I see the red warning frame around an image with Ok, using the above as test images and loading in this branch as the extension, I think we need a fix or two: Scenario 1: OS Preferences > Accessibility > Display > Reduce Motion unsetScenario 1a: GitHub > Accessibility > Autoplay Motion Sync with systemResult: Autoplaying giphy no controls. I see frame around gif with alt text ✅
My alt text revealer on Twitter stacks alt text boxes when this is the case, and perhaps I would suggest doing the same here. Scenario 1b: GitHub > Accessibility > Autoplay Motion EnabledResult: Plain autoplaying giphy (image wrapped in a I see frame around gif with alt text ✅
Scenario 1c GitHub > Accessibility > Autoplay Motion DisabledResult: Widget with play and link controls; begins as static image. I don't see any frame at all around the gif when it's paused, although it does appear when I activate it 🧐 I see in the DOM that there's an Secondly, I'm observing the alt text and when paused the alt text in the DOM reads "Play...." and when playing reads "Pause...", however the displayed alt text seems to be off-by-one here. Perhaps same here as in 1a where we display both Scenario 2: OS Preferences > Accessibility > Display > Reduce Motion setScenario 2a: GitHub > Accessibility > Autoplay Motion Sync with systemSame as scenario 1c = OS reduce motion unset x Autoplay disabled. Off-by-one alt text (play vs pause) and screen reader reads both Scenario 2b: GitHub > Accessibility > Autoplay Motion EnabledSame as scenario 1b = Plain autoplaying giphy, no widget, no controls. Screen reader just reads the alt text as corresponds to the visited link. Works as expected and as displayed. Scenario 2c GitHub > Accessibility > Autoplay Motion DisabledSame as Scenario 1c and 2a = OS reduce motion unset x Autoplay disabled. Visible captions don't match SR experience. Possible solutionI think by displaying both the I wonder what the off-by-one issue is. Maybe the extension does its thing before the widget's in the DOM. I did observe that the widget loaded after the other plain image, so it's possible it's an async action. How could the browser extension anticipate that? I'm not sure. Looking at the code, I think maybe it would be more clear to fork the logic -- in the situation of the plain gif, treat it like a regular old image same as we always have, and in the situation of the special component look for the two specific descriptions we want to be made visible. Just a suggestion! I'm not sure what Regarding anticipating the future of permissive |
be5e72b to
997869e
Compare
|
@andrialexandrou thank you for the amazingly comprehensive review ❤️ Following your suggestion, I decided to separate out the logic for Now we have a separate path for images contained within I decided not to output the
I agree with that! Mind another look? 🙏 |
|
autoplaying gif frames look good for the
I put these in "i expect, I see" format to clarify what I understand your aim to be. if I'm wrong, let me know. also I have some questions ab the animated-image development choices, I wonder if we talked sync about it you could answer those for me |
|
okay, thanks for pinging me on Slack. indeed I hadn't pulled in the latest. this looks really smooth now. thank you. all scenarios covered, though I did abbreviate my tests this time. I did
|
andrialexandrou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always setting a high bar for our work. this is awesome 🤘
Fixes: #28
(which is animgbut has abuttonparent witharia-label)