Open ev-codes opened 1 week ago
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.
If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.
Hey @ev-codes, the warning is intentional and it meant to let you know that you need to change aria-label
from ariaLabel
. Stop by office hours if you need any more clarity!
@sstrubberg As far as I understand it, the issue reported here is that the instance of ariaLabel
triggering the warning is originating from Carbon's own implementation of the getSelectionProps
function.
The values returned include both ariaLabel
and the expected aria-label
.
A similar issue exists for a number of the other functions, e.g. getRowsProps
, getExpandHeaderProps
, etc.
Please reopen this issue.
Yeah, sorry for the confusion, this is something we need to fix in all the applicable DataTable prop getters.
<TableSelectAll>
and the other DataTable components are correct in logging a deprecation warning for ariaLabel
. aria-label
should be used instead.
I'm not sure why the initial deprecation work didn't modify getSelectionProps()
to no longer return ariaLabel
and use aria-label
instead.
The problem
getSelectionProps()
(part of@carbon/react
) returnsariaLabel
as one of the properties.However,
<TableSelectAll>
logs a deprecation warning toconsole.warn
whenariaLabel
is passed into it. Unnecessary logs make it more difficult to find more important issues and slow down CI workflows.The solution
Either:
getSelectionProps()
no longer returnsariaLabel
<TableSelectAll>
should not log a deprecation warning when receivingariaLabel
Examples
Code:
Logs from test:
Application/PAL
No response
Business priority
None
Available extra resources
No response
Code of Conduct