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

[List] Accessibility Issues during keyboard navigation to "action-end" slot of List-Item #7974

Closed
2 of 4 tasks
pllcoster opened this issue Oct 11, 2023 · 5 comments
Closed
2 of 4 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. ArcGIS Knowledge Issues logged by ArcGIS Knowledge team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 3 A day or two of work, likely requires updates to tests. p - high Issue should be addressed in the current milestone, impacts component or core functionality spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.

Comments

@pllcoster
Copy link

Check existing issues

Summary

When navigating a list-item using the keyboard, and navigating to the "action-end" slot of the list item:

  • navigating using tab, I can press enter/spacebar to open a calcite dropdown in the "action-end" slot
  • navigating using left-right arrow keys, pressing enter/spacebar on the same item has no effect

Navigating using arrow keys makes the action-end item look focused, however the item cannot be used as expected, which may cause accessibility problems.

Related issue #7936

Actual Behavior

I have found that if you have a Calcite List, you can navigate from the List Item to the item in its "actions-end" slot using tab, and then (e.g. if the action-ends slot contains a Calcite Dropdown trigger action) you can use enter or spacebar to trigger the dropdown:

List Item Focused:
image

Tab to actions-end slot - pressing enter or spacebar will open the dropdown:
image

However once you have the actions-end slot focused, you can navigate around using the keyboard arrow keys, if you navigate away from the actions-end icon and then back to it, it looks like it is focused again (although the styling is different):
image

And now pressing enter or spacebar has no effect - the dropdown does not open.

Expected Behavior

Expected that if the action-end item is focused it should open by pressing enter or spacebar.

Reproduction Sample

https://codepen.io/pcoster/pen/oNJmZmj

Reproduction Steps

Follow the steps outlined in 'Actual Behavior' above

Reproduction Version

1.9.1

Working W3C Example/Tutorial

No response

Relevant Info

No response

Regression?

No response

Priority impact

p3 - want for upcoming milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Knowledge

@pllcoster pllcoster added 0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. p - high Issue should be addressed in the current milestone, impacts component or core functionality labels Oct 11, 2023
@github-actions github-actions bot added p3 - want for upcoming milestone calcite-components Issues specific to the @esri/calcite-components package. ArcGIS Knowledge Issues logged by ArcGIS Knowledge team members. labels Oct 11, 2023
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Nov 27, 2023
@geospatialem
Copy link
Member

Research spike to determine next steps regarding tree grid role.

@driskull
Copy link
Member

According to W3C docs...

Enter: If cell-only focus is enabled and focus is on the first cell with the aria-expanded property, opens or closes the child rows.,Otherwise, performs the default action for the cell.

https://www.w3.org/WAI/ARIA/apg/patterns/treegrid/#keyboardinteraction

So we would just need to figure out the "default action for the cell".

If a cell contains multiple actions, buttons, etc. How do we determine the default action? Should we just click the first element slotted in?

Thoughts @geospatialem @jcfranco

@geospatialem
Copy link
Member

If a cell contains multiple actions, buttons, etc. How do we determine the default action? Should we just click the first element slotted in?

It looks like the treegrid pattern would always have focus on the first element and enter would trigger the action.

So, in our case, the first slotted action in "actions-end" would be focused, and to get to other actions, would need to use tab and to go backwards through other actions, shift + tab similar to this native example.

Also of note: the treegrid role behaves differently with AT active, in particular JAWS, where the arrow keys, tab, and tab + shift will behave slightly different when JAWS is active.
- Keyboard only (also NVDA): tab to step into the next focused element / shift and tab to step back
- JAWS and keyboard 🦈 : Same as above and arrow keys to step forward/back between all elements, including focused elements

driskull added a commit that referenced this issue Nov 29, 2023
@geospatialem geospatialem added this to the 2023 December Priorities milestone Nov 29, 2023
@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. estimate - 3 A day or two of work, likely requires updates to tests. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Nov 29, 2023
driskull added a commit that referenced this issue Nov 29, 2023
…nent when using arrow keys (#8291)

**Related Issue:** #7974

## Summary

- Focuses on the first tabbable element inside the grid cell when using
arrow keys.
- Excludes hidden cells from the arrow key logic
- Adds dom utility `getFirstTabbable` to get first focusable element
from within an element.
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Nov 29, 2023
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem removed the 3 - installed Issues that have been merged to master branch and are ready for final confirmation. label Dec 1, 2023
@geospatialem geospatialem added the 4 - verified Issues that have been released and confirmed resolved. label Dec 1, 2023
@geospatialem
Copy link
Member

Verified in 1.12.0-next.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. ArcGIS Knowledge Issues logged by ArcGIS Knowledge team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 3 A day or two of work, likely requires updates to tests. p - high Issue should be addressed in the current milestone, impacts component or core functionality spike Issues that need quick investigations for time estimations, prioritization, or a quick assessment.
Projects
None yet
Development

No branches or pull requests

4 participants