-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve table caption accessibility #41980
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: +135 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this PR still has some way to go. Styles seem to be broken and the markup in the edit.js file still needs to be updated, so not sure if this is too early to leave a review.
I'm supportive of any change to improve accessibility, but it's worth pointing out there were two more problems with using a rich text <caption>
that weren't mentioned in #41502:
- Tab order is incorrect because the caption element is before the table in the DOM, but after it visually.
- Voiceover didn't announce rich text
caption
elements correctly when the table is focused. Potentially this may have been fixed in VO.
<Section type="body" rows={ body } /> | ||
<Section type="foot" rows={ foot } /> | ||
</table> | ||
<table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The <figure>
element provided a horizontally scrolling container for wide tables, and without that wide tables now breakout of the layout. I think a div
wrapper might be needed to replace that.
The markup in the editor now also doesn't match the frontend.
What?
This PR improves the Table markup for better A11y:
Fixes #41502
Old:
New:
Testing Instructions
Paste this code in the editor. The
old
content should be migrated to thenew
content: