Pandas DataFrame.to_html() accessibility limits for screen readers
0 reputation · 26 Jan 2020, 03:32 UTC
Goal
Produce HTML tables from pandas DataFrames that assistive technology can identify and navigate, including captions and semantic headers.
Constraints
DataFrame.to_html() emits table markup without guaranteed ARIA roles, captions, or summary attributes, so screen readers may announce unlabeled tables. Display options such as display.max_rows control truncation only and do not add semantic navigation. The Styler API can customize rendering, but confirm its stability in the installed pandas release before production use, because output may differ across versions or backends.
Questions
- Does
to_html()support parameters that add captions, scope attributes, or ARIA roles directly? - Is the
StylerAPI stable in the installed pandas release for accessible HTML export? - What markup changes should be expected when upgrading pandas versions?