-
Notifications
You must be signed in to change notification settings - Fork 72
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
⚠️ Add warnings for missing alt-text and auto-generated alt-text #1814
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: be7097f The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I am not sure how these will behave for notebooks, etc. Which has limited/no way to add alt text to for outputs at the moment, and so there would be many warnings you can't get rid of. Thoughts on this being opt-in vs opt out? |
Co-authored-by: Rowan Cockett <[email protected]>
@rowanc1 that's an interesting point. Jim and I were thinking about hand authored markup. What about stopping at output nodes, and not recursing into their children? Then, as long as this happens before embeds, we're OK? Incidentally, can't we use block labels ( |
I think a nice short term solution would be to not add this warning for output nodes, and to document that a good strategy is to use embed logic to get nicer things like captions, alt text, etc for notebook outputs |
@JimMadge I've updated this PR to use a different I've also added a test file. We didn't have time to add that when we paired on this PR. We use the @rowanc1 are you comfortable merging? We could opt to loosen the strictness by disabling the generated alt-text (and/or splitting it into a separate transform) until such time as we can default opt-out of certain warnings. |
I don't have strong feelings about opt-in or opt-out. On one hand, alt text is important for accessibility and it would be good to promote using it. On the other, it could make output very noisy and push people to ignore the warning. Thanks for the improvements 🚀. |
There is the capability to stop warnings for a certain image, if we pass the key through. (That is via This would enable turning on/off on a per-image basis, for example, if you are using a decorative image that does not have alt text, but want to warn/error on the rest. My preference is to change this to opt-in. I am more swayed by the |
That all sounds good to me. I would also be happy to work on those things if, perhaps, @agoose77 can spare some time to mentor me on it. |
Thanks for the helpful wider context, @rowanc1! It looks like we have two separate enhancements:
Both sound useful. @rowanc1, RE
I'm not 100% following the suggestion, but I understand that we have session-free and session-aware logging utilities. If you're happy to make that change at some point, that would be nice. I can put some cycles in this week to think about specifying a default set of error rules that merges with the user configuration. There isn't in my mind a rush to get this in, besides not letting it stagnate! |
I will jump in and make it possible to add a |
This PR adds two warnings with rules allowing them to be disabled,
image-has-alt-text
)altTextIsAutoGenerated
tag (image-alt-text-generated
)Example output,
I have a example project to test this, but haven't added a test here.