-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(TableContainer): support id-ref for the header #4807
Conversation
Deploy preview for the-carbon-components ready! Built with commit 4abe74d https://deploy-preview-4807--the-carbon-components.netlify.com |
Deploy preview for carbon-elements ready! Built with commit b5edac6 |
Deploy preview for carbon-components-react ready! Built with commit b5edac6 https://deploy-preview-4807--carbon-components-react.netlify.com |
Hey! @asudoh since this adds a new prop, is this technically a feat, not a fix? |
@abbeyhrt You are right technically, I made it a |
For reference, this falls under this section in our versioning guide: https://github.com/carbon-design-system/carbon/blob/master/docs/guides/versioning.md#a-new-prop-is-added-to-a-component |
This change adds a capability to specify the element ID of the `<h4>` in `<TableContainer>`. This allows application to set up our data table so VoiceOver announces the content in such `<h4>` when it announces "You are currently in a table" for `<table>`. Fixes carbon-design-system#3805.
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.
Definitely a bummer that we would need to add props to target inner children. I would assume we would also need to add descriptionId
for aria-describedby
? Are there any alternatives we could explore that don't rely on this?
8399c7f
to
2678511
Compare
An alternative may be |
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.
this looks good to me
@asudoh got it 👍 How would this work with the secondary label for the table btw? Specifically |
User of assistive technology can still hear the secondary label via a way of reading regular text. |
Would we need to use |
Are you asking adding both of |
That was my interpretation from the linked issue, let me know if I'm off here! Just trying to understand requirements to figure out the best way to support them. |
Adding both of |
@asudoh I'm unable to reproduce, could you help me understand what the issue is? Regardless, would it make sense for this to configurable as a prop for the user to specify for |
I see both title/description are read on forward-navigation, but not backward-navigation. |
I'm late on this, but here are the steps:
Leaving such problem is OK for me though. Wrt |
I think we could definitely go down that route if we're doing the Another idea was to create <TableContainer>
<TableTitle id="table-title">Title of the table</TableTitle>
<TableDescription id="table-desc">Table description</TableDescription>
<Table aria-labelledby="table-title" aria-describedby="table-desc">
{/* ... */}
</Table>
</TableContainer> |
Back on this, and made a change to auto-generate ID refs for |
This change adds a capability to specify the element ID of the
<h4>
in<TableContainer>
. This allows application to set up our data table so VoiceOver announces the content in such<h4>
when it announces "You are currently in a table" for<table>
.Fixes #3805.
Changelog
New
titleId
prop in<TableContainer>
.Testing / Reviewing
Testing should make sure
<TableContainer>
is not broken.