| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
For accessibility reasons users should be encouraged to add useful alt text to images. Currently there is no recommended way to do this using the standard Image object. Adding this field is a step towards getting a common way for notebook renderers to support alt text and towards encouraging libraries creating images to add meaningful alt text.
|
This is brilliant, and we should do it at the syntax level so that people can adopt it easily. However, alt is a subset of a much larger ecosystem that spans a number of concerns, including internationalization, intent, etc. in addition to assistive technology awareness. Ideally, we'd encourage consistency at the metadata level by adding "blessed" terms to the nbformat JSON schema so that clients aren't playing guessing games. The best of worlds would be to identify an existing standard, whether in JSON schema or whatever: my pick for this would be the web annotation data model which has mappings to w3c annotation-aria which can be accessibly embedded in html. Practically, this would mean replacing: "metadata": {"image/png": {"alt": "a picture of an elephant"}}to... "metadata": {"image/png": {
"annotations": [
# some more verbose JSON that other tools can read and reason about
]
}
}For some related things around making complex things describable, the p5 folk have done and written about some sterling work. |
Sorry, something went wrong.
|
I honestly do not have much experience in this area and am happy to defer to others for a more formal specification if there is interest in that direction. I think this is particularly important because while many people have been doing great work to make the tools accessible for the authors of these notebooks this seems like an obvious gap for the readers of these notebooks, especially given the plethora of publishing avenues. |
Sorry, something went wrong.
|
@blois really, thanks for starting this: I don't think anybody is experienced at this point, as we're trying to do something relatively difficult across a large number of pieces.
This is definitely the motivation for getting the metadata right. With the right metadata, we can enrich:
Starting where you have is a really great place! |
Sorry, something went wrong.
|
@bollwyvl If the desire is more than a plain string then it probably makes sense for this to be specified in nbformat first. I had started here since it appears to be the de facto specification for output metadata fields. |
Sorry, something went wrong.
|
I'd prefer to avoid broadening the scope of this change to to encompass more accessibility features across more types of outputs as I feel that work is much larger, more speculative and lacks a clear owner. Adding an alt field to the metadata is a straightforward fix to the problem. If there can be a more generalized set of accessibility metadata added to nbformat and outputs then it should be entirely reasonable for those to supersede simpler alt fields similar to how outputs themselves contain multiple prioritized formats. Please let me know if there are further changes I should make here, otherwise feel free to close this PR if an nbformat specification approach is preferred. |
Sorry, something went wrong.
|
I personally prefer keeping it as: "metadata": {"image/png": {"alt": "a picture of an elephant"}}
The closer we can keep it to what that coding languages already exists (HTML, JQuery, etc) the better. Users shouldn't have to learn a new language or way of doing things just to support persons with disabilities/handicaps. alt is preferred and if that's already in the product, I say don't change it, but that's just me. |
Sorry, something went wrong.
|
Sorry for the delay in reviewing / merging. I have no opposition to this, it's just unclear to me if you want to get that in as is, or build consensus first. Let me know and I'm happy to merge. |
Sorry, something went wrong.
|
If someone is interested in picking up the work to formally spec accessibility for outputs then I think this PR should be dropped. I opened jupyter/accessibility#37 and attended the regular meeting to discuss, I do not believe anyone currently has the time to pick up the larger work. I don't think there's any immediate urgency for this issue and am fine waiting to see if we can build traction elsewhere. The one thing is that once some variant of this lands is that it may be good to try to get matplotlib images to automatically fill in the alt text. I believe the primary work would be somewhere in ipython/IPython/core/pylabtools.py Line 209 in d737c32 |
Sorry, something went wrong.
|
At this point I believe that the approach proposed here is the best path forward. I'd like to see this merged so we can move on to encouraging users and libraries to include accessible alt text on images. |
Sorry, something went wrong.
|
I agree that landing this as-is is the best start. It doesn't preclude more detailed abstract approaches, and we shouldn't have to wait for those. This is simple, straightforward, and solves a real issue without introducing any conflict with other ideas. |
Sorry, something went wrong.
|
I'm not speaking from a technical background here, but I would love to see this happen. I've had people in multiple communities now ask me for best practices on how to describe images like this, so I think it this would be a great step in getting a standard and supported method for alt text. Since this has an approval, what are the next steps to getting this merged? |
Sorry, something went wrong.
|
I believe that the next step is that someone with write access to the repo needs to merge it. Please let me know if there is any action required on my part. |
Sorry, something went wrong.
|
THanks, let's get that in an iterate if necessary. |
Sorry, something went wrong.
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
$ git checkout 7.x $ git pull
$ git cherry-pick -m1 59e313b13998ab355470ce8b89c468e3399f07e8
$ git commit -am 'Backport PR #12864: Allow specifying alt text for IPython.display.Image.'
git push YOURFORK 7.x:auto-backport-of-pr-12864-on-7.x
And apply the correct labels and milestones. Congratulation you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove Still Needs Manual Backport label once the PR gets merged. If these instruction are inaccurate, feel free to suggest an improvement. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
For accessibility reasons users should be encouraged to add meaningful alt text to images. Currently there is no recommended way to do this using the standard Image object. Adding this field is a step towards having a common way for notebook renderers to support alt text and towards encouraging libraries creating images to add meaningful alt text.
See https://www.w3.org/standards/webdesign/accessibility#examples
Currently JLab just does https://github.com/jupyterlab/jupyterlab/blob/master/packages/rendermime/src/renderers.ts#L674.
I'd like to see the ecosystem get to the point where titles on graphs displayed as images automatically become alt text for those images.