Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/eui/changelogs/upcoming/9212.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Accessibility**

- Changed the close button position in `EuiFlyout` to allow for the modal title to be perceivable first
4 changes: 2 additions & 2 deletions packages/eui/src/components/flyout/flyout.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ describe('EuiFlyout', () => {
it('traps focus and cycles tabbable items', () => {
cy.mount(<Flyout />);
cy.get('[data-test-subj="flyoutSpec"]').should('be.focused');
cy.repeatRealPress('Tab', 4);
cy.get('[data-test-subj="itemC"]').should('be.focused');
cy.repeatRealPress('Tab', 3);
cy.get('[data-test-subj="itemC"]').should('be.focused');
cy.repeatRealPress('Tab', 2);
cy.get('[data-test-subj="euiFlyoutCloseButton"]').should('be.focused');
});

Expand Down
2 changes: 1 addition & 1 deletion packages/eui/src/components/flyout/flyout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,9 @@ export const EuiFlyout = forwardRef(
aria-describedby={!isPushed ? ariaDescribedBy : _ariaDescribedBy}
data-autofocus={!isPushed || undefined}
>
{contentToRender}
{!isPushed && screenReaderDescription}
{closeButton}
{contentToRender}
</Element>
</EuiFocusTrap>
</EuiFlyoutWrapper>
Expand Down
2 changes: 1 addition & 1 deletion packages/eui/src/components/tool_tip/tool_tip.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('EuiToolTip', () => {

cy.get('[data-test-subj="flyout"]').focus();

cy.repeatRealPress('Tab', 2);
cy.repeatRealPress('Tab', 1);
cy.get('[data-test-subj="tool_tip"]').should('exist');

cy.realPress('Escape');
Expand Down