carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.86k stars 1.82k forks source link

Data Table - checkbox focus state #9808

Closed jnm2377 closed 1 year ago

jnm2377 commented 3 years ago

Checkmarks within data table (that are not the select column) don't have consistent focus like the expandable and select buttons do.

Discussed in https://github.com/carbon-design-system/carbon/discussions/9799

Originally posted by **half5cat** October 5, 2021 Is this intentional? If so, please elaborate on this. Focus on Expandable Icon: ![image](https://user-images.githubusercontent.com/1887866/135988683-8aea2b17-1937-480e-b830-0226d3f2e3d7.png) Focus on Checkbox: ![image](https://user-images.githubusercontent.com/1887866/135988910-031a98ac-3e87-45d9-8ab0-23484f4d842e.png) Source for the above: https://react.carbondesignsystem.com/?path=/story/components-datatable-development--example Focus on Checkmark Column: ![image](https://user-images.githubusercontent.com/1887866/135989069-4c112814-3559-41cc-8668-58b2dad7a1fb.png) Source: https://react.carbondesignsystem.com/?path=/story/components-datatable--with-checkmark-columns
jnm2377 commented 3 years ago

Question for @carbon-design-system/design, should the border radius match for these focus states in the data table?

laurenmrice commented 3 years ago

@jnm2377 The checkboxes in the data table should not have a border radius, they should be straight edges. We used to have a border radius on them but they use box-shadow which did not show up in HCM. We changed them back to be straight corners and to use outline instead. Ref: #6471 and #7620


Spec: Artboard Copy

jnm2377 commented 2 years ago

Thanks for the info @laurenmrice Looks like our DataTable didn't get that update and the checkbox focus is still rounded. So looks like the action items are:

laurenmrice commented 2 years ago

@jnm2377 Yes, the focus for the chevron and the checkbox should be the same size with the padding Anna mentioned. All checkboxes in the data table should get this padding.


Artboard