-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
EnhancementNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member
Description
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.
thwith classrow_headingneeds therowscope
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
thelements themselves.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
EnhancementNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member