From 88c5a4884cfaae8428c7f0f37b77de8d7615c2f5 Mon Sep 17 00:00:00 2001 From: gabalafou Date: Wed, 26 Jun 2024 12:02:35 +0300 Subject: [PATCH] Scrollable table? Make keyboard accessible (focusable) --- .../assets/scripts/pydata-sphinx-theme.js | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js b/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js index 63a5d861e..f2b677077 100644 --- a/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js +++ b/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js @@ -524,7 +524,9 @@ function showVersionWarningBanner(data) { const timeout_in_days = 14; if (days_passed < timeout_in_days) { console.info( - `[PST] Suppressing version warning banner; was dismissed ${Math.floor(days_passed)} day(s) ago`, + `[PST] Suppressing version warning banner; was dismissed ${Math.floor( + days_passed, + )} day(s) ago`, ); return; } @@ -727,10 +729,18 @@ function addTabStopsToScrollableElements() { const updateTabStops = () => { document .querySelectorAll( - "pre, " + // code blocks - ".nboutput > .output_area, " + // NBSphinx notebook output - ".cell_output > .output, " + // Myst-NB - ".jp-RenderedHTMLCommon", // ipywidgets + [ + // code blocks + "pre", + // NBSphinx notebook output + ".nboutput > .output_area", + // Myst-NB + ".cell_output > .output", + // ipywidgets + ".jp-RenderedHTMLCommon", + // [rST table nodes](https://www.docutils.org/docs/ref/doctree.html#table) + ".pst-scrollable-table-container", + ].join(", "), ) .forEach((el) => { el.tabIndex =