-
Can a switch live in a table row or only checkboxes? See attached photos. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey, @mtl87! Tables should only contain static data (see Table docs here) because interactions on large Tables can cause unpleasant experiences for some assistive technology/keyboard users. If you need to put interactive controls in your Table, we'd suggest using a Data Grid instead. The Data Grid only has one tab stop, so users don't have to tab through every single control in order to escape the table. Switches are fine to use in Data Grids, as are Checkboxes. If you do use the Switch, just be sure that the label text ("Enable" in your screenshot) doesn't change based on the state of the Switch. For example, when a user clicks a Switch, that label text shouldn't change to "Disable" (read more on Switch docs). |
Beta Was this translation helpful? Give feedback.
Hey, @mtl87! Tables should only contain static data (see Table docs here) because interactions on large Tables can cause unpleasant experiences for some assistive technology/keyboard users. If you need to put interactive controls in your Table, we'd suggest using a Data Grid instead. The Data Grid only has one tab stop, so users don't have to tab through every single control in order to escape the table.
Switches are fine to use in Data Grids, as are Checkboxes. If you do use the Switch, just be sure that the label text ("Enable" in your screenshot) doesn't change based on the state of the Switch. For example, when a user clicks a Switch, that label text shouldn't change to "Disable" (rea…