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
Interactive/Selectable labels and text glyphs #10299
Comments
Currently for (1) it is possible to use the For (2) the short answer is no. Bokeh renders into HTML raster canvases (or HTML canvas). These are ultimately just 2d arrays of color values, and are completely opaque to the DOM. The browser has zero knowledge of what is "inside" a canvas, so nothing rendered into a canvas can be used for search. However, there's nothing stopping us from adding actual DOM elements alongside the canvas that have searchable content or tags (maybe these are invisible and just exist to provide this searchable metadata). This seems like a reasonable thing but also intersects with other considerations like affording accessibility features for things like screen readers. So before jumping in to some implementation, I'd really want an actual detailed plan/proposal with some input from people that know more about this than I do. cc @tcmetzger @bokeh/dev |
Those are some good points. And yes, the fundamental problem of the HTML canvas being opaque to the DOM ist unfortunately also an issue for accessibility (e.g. w3.org: "HTML5 currently lacks specific mechanisms to add accessibility hooks for content produced using this element. " or mozilla.org: "In general, you should avoid using canvas in an accessible website or app."). I think that for a graphics-heavy library such as Bokeh, it will be difficult to achieve full accessibility. But a few things could probably be improved more easily, as a start. Accessibility is a complex issue, and I honestly don't know enough about Bokeh's inner workings (and potential history with accessibility issues) to come up with a comprehensive plan. But here are some quick ideas to get the discussion going:
In conclusion: I think adding some "invisible" DOM elements with ARIA attributes into the canvas would help with this issue/feature request and benefit accessibility at the same time. I also think that adding this content to the canvas would not get in the way of additional accessibility improvements in the future. |
Hi, (1) is it possible to make titles or labels or text be clickable to open URLs? (2) is it possible to make titles or labels be searchable by a browser?
Best Regards!
The text was updated successfully, but these errors were encountered: