bito-code-review[bot] commented on code in PR #37109:
URL: https://github.com/apache/superset/pull/37109#discussion_r2814714269
##########
superset-frontend/src/explore/components/DataTableControl/index.tsx:
##########
@@ -61,26 +61,32 @@ export const CopyToClipboardButton = ({
}: {
data?: TabularDataRow[];
columns?: string[];
-}) => (
- <CopyToClipboard
- text={
- data && columns ? prepareCopyToClipboardTabularData(data, columns) : ''
- }
- wrapped={false}
- copyNode={
- <Icons.CopyOutlined
- iconSize="l"
- aria-label={t('Copy')}
- role="button"
- css={css`
- &.anticon > * {
- line-height: 0;
- }
- `}
- />
- }
- />
-);
+}) => {
+ const theme = useTheme();
+ return (
+ <CopyToClipboard
+ text={
+ data && columns ? prepareCopyToClipboardTabularData(data, columns) : ''
+ }
+ wrapped={false}
+ copyNode={
+ <span>
+ <Icons.CopyOutlined
+ iconColor={theme.colorIcon}
+ iconSize="l"
+ aria-label={t('Copy')}
+ role="button"
+ css={css`
+ &.anticon > * {
+ line-height: 0;
+ }
+ `}
Review Comment:
<!-- Bito Reply -->
The suggestion to improve accessibility by wrapping the Icons.CopyOutlined
in a span with role="button" and aria-label has been applied in the PR changes,
matching the provided commit.
**superset-frontend/src/explore/components/DataTableControl/index.tsx**
```
copyNode={
<span role="button" aria-label={t('Copy')}>
<Icons.CopyOutlined
iconColor={theme.colorIcon}
iconSize="l"
css={css`
&.anticon > * {
line-height: 0;
}
`}
/>
</span>
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]