Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ENH: th elements from Styler need the row scope #61350

Copy link
Copy link
Closed
@reteps

Description

@reteps
Issue body actions

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 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

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.