+
+
+
+
+
+
+
+
+
+
+ );
+
+ await wait(10);
+ expect(screen.getByLabelText('Option One')).toHaveFocus();
+
+ userEvent.tab();
+ expect(screen.getByRole('button')).toHaveFocus();
+
+ userEvent.tab({ shift: true });
+ await wait(10);
+ expect(screen.getByLabelText('Option Three')).toHaveFocus();
+
+ userEvent.tab({ shift: true });
+ await wait(10);
+ expect(screen.getByRole('button')).toHaveFocus();
+ });
+
it('manages aria-hidden attributes', () => {
const adjacentDiv = document.createElement('div');
adjacentDiv.setAttribute('data-testid', 'adjacent');