[19635] fix: Add scope="col" to th elements for td-has-header a11y compliance - #19636
Open
fkwq34 wants to merge 4 commits into
Open
[19635] fix: Add scope="col" to th elements for td-has-header a11y compliance#19636fkwq34 wants to merge 4 commits into
fkwq34 wants to merge 4 commits into
Conversation
Contributor
|
I only quickly reviewed the changes you made to table.ts. Wouldn't it be more efficient to be proactive vs reactive by adding the missing attribute when the "th" is created? How does querying/setTimeout effect performance when a table has a large number of columns or a large number of rows? What would happen if a table (HTML and/or PrimeNG) was implemented within a PrimeNG table? PrimeNG (and your change) should not be modifying any embedded non-PrimeNG tables. |
added 2 commits
June 24, 2026 14:09
Author
|
@rosenthalj Good points. I have reworked the approach:
Let me know if you see any other issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes: #19635
Description
Adds scope="col" attribute to elements in Table and TreeTable components to fix the td-has-header accessibility violation.
Changes
Why
Without the scope attribute, screen reader users cannot understand data context when navigating table cells. The scope="col" attribute creates a programmatic relationship between data cells and their column headers.
Testing
References