Skip to content

Commit eead097

Browse files
author
Michael Jordan
authored
#5621 [a11y] ResizableTableContainer: focused row obscured by table header with position: sticky (#5622)
1 parent 80fcbf5 commit eead097

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

examples/rac-tailwind/src/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ function DatePickerExample() {
419419
function ContactListExample() {
420420
return (
421421
<div className="bg-gradient-to-r from-blue-500 to-sky-500 p-8 rounded-lg flex justify-center">
422-
<ListBox aria-label="Contacts" selectionMode="multiple" selectionBehavior="replace" className="w-72 max-h-[290px] overflow-auto outline-none bg-white text-gray-700 p-2 flex flex-col gap-2 rounded-lg shadow scroll-pt-6">
422+
<ListBox aria-label="Contacts" selectionMode="multiple" selectionBehavior="replace" className="w-72 max-h-[290px] overflow-auto outline-none bg-white text-gray-700 p-2 flex flex-col gap-2 rounded-lg shadow scroll-pb-2 scroll-pt-7">
423423
<ContactSection title="Favorites">
424424
<Contact id="wade" name="Tony Baldwin" handle="@tony" avatar="https://images.unsplash.com/photo-1633332755192-727a05c4013d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" />
425425
<Contact id="arelene" name="Julienne Langstrath" handle="@jlangstrath" avatar="https://images.unsplash.com/photo-1580489944761-15a19d654956?ixlib=rb-1.2.1&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" />
@@ -499,7 +499,7 @@ function TableExample() {
499499

500500
return (
501501
<div className="bg-gradient-to-r from-indigo-500 to-violet-500 p-8 rounded-lg flex items-center justify-center md:col-span-2">
502-
<div className="max-h-[280px] overflow-auto relative bg-white rounded-lg shadow text-gray-600">
502+
<div className="max-h-[280px] overflow-auto scroll-pt-[2.321rem] relative bg-white rounded-lg shadow text-gray-600">
503503
<Table aria-label="Stocks" selectionMode="single" selectionBehavior="replace" sortDescriptor={sortDescriptor} onSortChange={setSortDescriptor} className="border-separate border-spacing-0">
504504
<TableHeader>
505505
<StockColumn id="symbol" allowsSorting>Symbol</StockColumn>

packages/dev/docs/pages/react-aria/home/ExampleApp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export function ExampleApp() {
252252
)}
253253
</GridList>
254254
}
255-
{!isSmall && <ResizableTableContainer className="flex-1 w-full overflow-auto relative border dark:border-zinc-700 rounded-lg" onScroll={onScroll}>
255+
{!isSmall && <ResizableTableContainer className="flex-1 w-full overflow-auto scroll-pt-[2.281rem] relative border dark:border-zinc-700 rounded-lg" onScroll={onScroll}>
256256
<Table aria-label="My plants" selectionMode="multiple" sortDescriptor={sortDescriptor} onSortChange={setSortDescriptor}>
257257
<TableHeader columns={columns}>
258258
{column => <Column {...column} />}

packages/react-aria-components/docs/examples/contact-list.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ import {ListBox, ListBoxItem, Section, Header, Collection, Text} from 'react-ari
112112
function ContactListExample() {
113113
return (
114114
<div className="bg-gradient-to-r from-blue-500 to-sky-500 p-8 rounded-lg flex justify-center">
115-
<ListBox aria-label="Contacts" selectionMode="multiple" selectionBehavior="replace" className="w-72 max-h-[290px] overflow-auto outline-none bg-white text-gray-700 p-2 flex flex-col gap-2 rounded-lg shadow scroll-pt-6">
115+
<ListBox aria-label="Contacts" selectionMode="multiple" selectionBehavior="replace" className="w-72 max-h-[290px] overflow-auto outline-none bg-white text-gray-700 p-2 flex flex-col gap-2 rounded-lg shadow scroll-pb-2 scroll-pt-7">
116116
<ContactSection title="Favorites" items={favorites}>
117117
{item => <Contact item={item} />}
118118
</ContactSection>

packages/react-aria-components/docs/examples/stock-table.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function StockTableExample() {
106106

107107
return (
108108
<div className="bg-gradient-to-r from-indigo-500 to-violet-500 p-8 rounded-lg flex items-center justify-center md:col-span-2">
109-
<ResizableTableContainer className="max-h-[280px] w-full overflow-auto relative bg-white rounded-lg shadow text-gray-600">
109+
<ResizableTableContainer className="max-h-[280px] w-full overflow-auto scroll-pt-[2.321rem] relative bg-white rounded-lg shadow text-gray-600">
110110
<Table aria-label="Stocks" selectionMode="multiple" selectionBehavior="replace" sortDescriptor={sortDescriptor} onSortChange={setSortDescriptor} className="border-separate border-spacing-0">
111111
<TableHeader>
112112
<StockColumn id="symbol" allowsSorting>Symbol</StockColumn>

starters/tailwind/src/Table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {focusRing} from './utils';
2525

2626
export function Table(props: TableProps) {
2727
return (
28-
<ResizableTableContainer className="max-h-[280px] w-[550px] overflow-auto relative border dark:border-zinc-600 rounded-lg">
28+
<ResizableTableContainer className="max-h-[280px] w-[550px] overflow-auto scroll-pt-[2.281rem] scroll-pt-[2.281rem] relative border dark:border-zinc-600 rounded-lg">
2929
<AriaTable {...props} className="border-separate border-spacing-0" />
3030
</ResizableTableContainer>
3131
);

0 commit comments

Comments
 (0)