Skip to content

fix(table): various accessibility issues#2885

Merged
bennypowers merged 2 commits intopatternfly:mainfrom
atharv-g-kulkarni:pf-table-2813
Apr 15, 2026
Merged

fix(table): various accessibility issues#2885
bennypowers merged 2 commits intopatternfly:mainfrom
atharv-g-kulkarni:pf-table-2813

Conversation

@atharv-g-kulkarni
Copy link
Copy Markdown
Contributor

What I did

  • Fixed issues mentioned in the issue.
  • Improved accessibility score of pf-table (Table, Expandable Rows Compound, Sortable) from 91 to 100

Before:
Screenshot from 2024-12-06 12-11-29
Screenshot from 2024-12-06 12-11-53
Screenshot from 2024-12-06 12-12-17

After:
Screenshot from 2024-12-06 12-08-09
Screenshot from 2024-12-06 12-09-16
Screenshot from 2024-12-06 12-09-40


  • Improved accessibility score of pf-table (Expandable Rows) improved from 81 to 90.

Before:
Screenshot from 2024-12-06 12-12-55

After:
Screenshot from 2024-12-06 12-10-17

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 6, 2024

🦋 Changeset detected

Latest commit: db81c44

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@patternfly/elements Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@atharv-g-kulkarni atharv-g-kulkarni changed the title 2813: Fix table accessibility issue fix(table): Fix table accessibility issue-2813 Dec 6, 2024
@atharv-g-kulkarni atharv-g-kulkarni changed the title fix(table): Fix table accessibility issue-2813 fix(table): fix table accessibility issue-2813 Dec 6, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 6, 2024

✅ Commitlint tests passed!

More Info
{
  "valid": true,
  "errors": [],
  "warnings": [],
  "input": "fix(table): fix table accessibility issue-2813"
}

@netlify
Copy link
Copy Markdown

netlify bot commented Dec 6, 2024

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit db81c44
🔍 Latest deploy log https://app.netlify.com/projects/patternfly-elements/deploys/69df82efdf6a370008fec253
😎 Deploy Preview https://deploy-preview-2885--patternfly-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread elements/pf-table/pf-tr.ts Outdated
Comment thread elements/pf-table/pf-tr.ts Outdated
Copy link
Copy Markdown
Collaborator

@zeroedin zeroedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So enacting the requested changes myself locally I think I opened a broader issue here. Because we are using button as an expander, and using aria-expanded on it we equally need a aria-controls which isn't currently being applied. Also due to the fact the element being opened#expansion is across shadow dom roots I'm going to assume we are going to run into cross root aria issues with that.

@adamjohnson when you get the chance lets review this together.

@bennypowers
Copy link
Copy Markdown
Member

can the button's aria-controls reference be to the row on

<div id="container" role="${ifDefined(this.expandable ? 'row' : undefined)}">
?

- Correct ARIA role for column headers (`colheader` -> `columnheader`)
- Add accessible label to the row expand/collapse toggle button
- Add `aria-controls` linking the toggle button to its expansion content

Closes patternfly#2813

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bennypowers bennypowers enabled auto-merge (squash) April 15, 2026 12:20
Fix accessibility features for the pf-table component, including column header role and accessible label for the row toggle button.
@bennypowers bennypowers changed the title fix(table): fix table accessibility issue-2813 fix(table): various accessibility issues Apr 15, 2026
@bennypowers bennypowers disabled auto-merge April 15, 2026 12:24
@bennypowers bennypowers merged commit 783686a into patternfly:main Apr 15, 2026
10 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants