Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiPageHeader] The focus order of rightSideItems does not correspond to the logical processing sequence #6693

Closed
morhof opened this issue Apr 5, 2023 · 7 comments · Fixed by #6753

Comments

@morhof
Copy link

morhof commented Apr 5, 2023

WCAG success criterion 2.4.3 - focus order - A

Steps to reproduce

  1. Click on Management
  2. Select Stack Management
  3. Select Saved Objects

image

Actual Result

  • After opening the page “Saved Objects”, the focus is set on the button “Export 6 objects”, and not on “Refresh”, so that keyboard users must navigate from right to left, which is not the expected sequence.

Expected Result

  • The focus order should correspond to the logical and visual processing order.
  • The buttons should be efficiently accessible via shortcut.

Meta Issue
n.a.

Kibana Version:
8.3
OS:
Microsoft Windows 10 Enterprise (64-bit)
Browser:
Google Chrome 109.0.5414.75 (64-Bit)

Screen reader:
n.a.

Relevant WCAG Criteria:
WCAG success criterion 2.4.3 - focus order - A
https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html

Relevant ARIA spec:
n.a.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@elasticmachine

This comment was marked as outdated.

@bhavyarm bhavyarm added the bug label Apr 5, 2023
@cee-chen
Copy link
Member

cee-chen commented Apr 5, 2023

Transferring to the EUI repo - this needs to be addressed at the EuiPageHeader level.

@cee-chen cee-chen removed the bug label Apr 5, 2023
@cee-chen cee-chen transferred this issue from elastic/kibana Apr 5, 2023
@cee-chen cee-chen changed the title (Accessibility) The focus order does not correspond to the logical processing sequence - example 1 [EuiPageHeader] The focus order of rightSideItems does not correspond to the logical processing sequence Apr 5, 2023
@breehall breehall self-assigned this Apr 24, 2023
@breehall
Copy link
Contributor

After reviewing, I don't think this is a bug. EuiPageHeader intentionally sets the content of the header to have a flex-direction of row-reverse. This is why the last element in the header is selected on focus first. The component has the rightSideGroupProps prop that can be used to change the direction of these elements to use row instead of row-reverse.

In terms of accessibility, @1Copenut do you mind throwing in your 2 cents? I'm inclined to say it's not an issue and if the team wanted to update the direction of the elements, they have the ability to. I don't think this requires any changes in EUI.

@cee-chen
Copy link
Member

This is an accessibility issue, not a "bug" per se, but it is definitely an issue and the default needs to be changed. Just because consumers can override it via props doesn't mean they will, and the role of EUI is to set good accessibility defaults and best practices.

Instead of using flex-direction we should clone and reverse the array so that DOM rendering follows the tab order.

@1Copenut
Copy link
Contributor

I +1 to @cee-chen comment here. I was reading through Technique C27: Making the DOM order match the visual order to double-check. Visually English is top to bottom and left to right, so moving out of the left navigation users have a reasonable expectation the Refresh button would receive focus first (in the original highlighted example).

@breehall
Copy link
Contributor

Instead of using flex-direction we should clone and reverse the array so that DOM rendering follows the tab order.

Thank you both for the explanations here! I'll move forward with this info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants