Skip to content

Fix responsive table when firstCellIsHeader is set#1174

Merged
colinrotherham merged 2 commits intomainfrom
table-responsive
Apr 7, 2025
Merged

Fix responsive table when firstCellIsHeader is set#1174
colinrotherham merged 2 commits intomainfrom
table-responsive

Conversation

@colinrotherham
Copy link
Copy Markdown
Contributor

@colinrotherham colinrotherham commented Mar 6, 2025

Description

This PR fixes the Responsive table to restore scope="row" when firstCellIsHeader is enabled

It was split out from #1172 as part of #1171 and fixes #985

- <td class="nhsuk-table__cell">
+ <th scope="row" class="nhsuk-table__cell">

Checklist

@colinrotherham colinrotherham changed the title Fix Table component responsive layout when firstCellIsHeader is set Fix responsive table when firstCellIsHeader is set Mar 6, 2025
@anandamaryon1
Copy link
Copy Markdown
Contributor

Nice, thanks for looking at this one. I don't think when in stacked layout that the bolded th is helpful, BUT we're refactoring the responsive table layout in #1156 anyway, and because it swaps to a dl for the stacked layout, then this shouldn't be an issue.

Base automatically changed from table-classes to main March 11, 2025 12:57
@colinrotherham colinrotherham force-pushed the table-responsive branch 3 times, most recently from 2fdaa06 to 6cc8140 Compare March 18, 2025 14:43
@colinrotherham colinrotherham force-pushed the table-responsive branch 2 times, most recently from b2515b9 to 082373c Compare April 3, 2025 17:49
@colinrotherham
Copy link
Copy Markdown
Contributor Author

Do you mind reviewing this again please @anandamaryon1?

…I don't think when in stacked layout that the bolded th is helpful…

I've removed the th bold styling and I'll address any conflicts in #1156 as work continues

Copy link
Copy Markdown
Contributor

@anandamaryon1 anandamaryon1 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@colinrotherham colinrotherham merged commit 6d9e3ca into main Apr 7, 2025
10 checks passed
@colinrotherham colinrotherham deleted the table-responsive branch April 7, 2025 14:57
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.

Responsive table firstCellIsHeader does not work

2 participants