Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve the accessibility of figures shown with_repr_html_ #15971

Open
@choldgraf

Description

@choldgraf

I was running into some accessibility audit errors with Jupyter Book, and it made me realize that the_repr_html_ method of Figures doesn't outputimg elements that havealt tags (something that screen readers like).

It seems that the relevant code is here:

def_repr_html_(self):

and then uses the template that's referenced here:

tpl=Path(core.FigureManagerWebAgg.get_static_file_path(),

Maybe using this?

https://github.com/matplotlib/matplotlib/blob/be978a35932a9f303f3d60f14f52ed9df89334c5/lib/matplotlib/backends/web_backend/js/mpl.js

I wonder if this could be a relatively simple fix by making the figure title thealt tag by default, and if it doesn't exist, just making it something likeFigure?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp