Skip to content

Commit 0786d89

Browse files
committed
chore: Minor changes to focus cell
1 parent f620cc4 commit 0786d89

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

pages/table/grouped-column-customer-pages.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ export default function CustomerPagesDemo() {
685685
const stickyColumns = { first: +firstSticky, last: +lastSticky };
686686

687687
return (
688-
<SimplePage title="Column Grouping Customer Use Cases" i18n={{}} screenshotArea={{}}>
688+
<SimplePage title="Column Grouping Customer Use Cases" i18n={{}} screenshotArea={{}}>
689689
<SpaceBetween size="xxl">
690690
<SpaceBetween size="m" direction="horizontal" alignItems="end">
691691
<Toggle onChange={({ detail }) => setUrlParams({ resizable: detail.checked })} checked={resizable}>

src/table/header-cell/styles.scss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ $cell-horizontal-padding: awsui.$space-scaled-l;
9595
// is the table-level visibility prop (for the measurement thead), not our placeholder concept.
9696
&:has(.header-cell-hidden-content) {
9797
border-block-end-color: transparent;
98+
99+
// Show focus ring on the th when the inner focusable div receives focus.
100+
&:focus-within {
101+
@include styles.focus-highlight(calc(-1 * #{awsui.$space-scaled-xxs}));
102+
}
98103
}
99104

100105
// Divider styles for hidden placeholder cells (only when NOT the last cell in the row).
@@ -295,9 +300,10 @@ settings icon in the pagination slot.
295300
}
296301
}
297302

298-
// Hidden placeholder cell content — empty but maintains cell structure
303+
// Hidden placeholder cell content — empty but focusable for keyboard navigation.
299304
.header-cell-hidden-content {
300-
// No padding or visible content — the cell is purely structural
301-
// Height is determined by sibling cells in the same row
302-
inline-size: 100%;
305+
// No visible content — purely a focus target for grid navigation.
306+
&:focus {
307+
outline: none;
308+
}
303309
}

0 commit comments

Comments
 (0)