Skip to content

Commit 1c338cb

Browse files
authored
Scrollable table? Make keyboard accessible (focusable) (#1903)
#1827 introduced an [Axe accessibility regression](https://dequeuniversity.com/rules/axe/4.0/scrollable-region-focusable). See also: - #1787 - #1428
1 parent 00708ff commit 1c338cb

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js

+15-5
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,9 @@ function showVersionWarningBanner(data) {
524524
const timeout_in_days = 14;
525525
if (days_passed < timeout_in_days) {
526526
console.info(
527-
`[PST] Suppressing version warning banner; was dismissed ${Math.floor(days_passed)} day(s) ago`,
527+
`[PST] Suppressing version warning banner; was dismissed ${Math.floor(
528+
days_passed,
529+
)} day(s) ago`,
528530
);
529531
return;
530532
}
@@ -727,10 +729,18 @@ function addTabStopsToScrollableElements() {
727729
const updateTabStops = () => {
728730
document
729731
.querySelectorAll(
730-
"pre, " + // code blocks
731-
".nboutput > .output_area, " + // NBSphinx notebook output
732-
".cell_output > .output, " + // Myst-NB
733-
".jp-RenderedHTMLCommon", // ipywidgets
732+
[
733+
// code blocks
734+
"pre",
735+
// NBSphinx notebook output
736+
".nboutput > .output_area",
737+
// Myst-NB
738+
".cell_output > .output",
739+
// ipywidgets
740+
".jp-RenderedHTMLCommon",
741+
// [rST table nodes](https://www.docutils.org/docs/ref/doctree.html#table)
742+
".pst-scrollable-table-container",
743+
].join(", "),
734744
)
735745
.forEach((el) => {
736746
el.tabIndex =

0 commit comments

Comments
 (0)