You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the pandas Styler API can be used to create a HTML table from a dataframe. However, the tables it generates are not accessible: it fails WCAG/H63.
Feature Description
Ensure the output generated by Styler is accessible.
th with class row_heading needs the row scope
I use the current workaround to add this rule myself:
html_root = lxml.html.fromstring(frame_style.to_html())
for th in html_root.xpath("//th[contains(@class, 'row_heading')]"):
th.set("scope", "row")
Alternative Solutions
Make the styler API more flexible for adding attributes. Currently, set_td_classes and set_table_styles aren't flexible enough for this, and set_table_attributes can't set attributes on th elements themselves.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
Currently, the pandas Styler API can be used to create a HTML table from a dataframe. However, the tables it generates are not accessible: it fails WCAG/H63.
Feature Description
Ensure the output generated by Styler is accessible.
th
with classrow_heading
needs therow
scopeI use the current workaround to add this rule myself:
Alternative Solutions
th
elements themselves.Additional Context
No response
The text was updated successfully, but these errors were encountered: