iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
84 stars 23 forks source link

fix(Table): Keyboard Navigation Support #802

Closed elephantcatdog closed 2 years ago

elephantcatdog commented 2 years ago

Fixed sorting, filtering, and anchor navigation issues in the table.

image Sorting:

image Filtering

image Anchors

Added tests for sorting and filtering

Closes iTwin/iTwinUI-react#488

Checklist

elephantcatdog commented 2 years ago

There are extraneous changes shown in this PR right now because the main branch hasn't been merged into itwinui-css-v1 (how to do?), and I initially made this branch off of main. If you want to review it, the relevant changes are in Table.tsx, Table.test.tsx, and Table.stories.tsx.

elephantcatdog commented 2 years ago

I checked if Buttons were accessible with the keyboard within a table and they are. The issue with Anchors in a table doesn't seem to be a table issue.

elephantcatdog commented 2 years ago

I played with the tests, trying to get it to work (fail) for the filter test, but couldn't. I dunno if it helps someone help me to leave it like this, but the alternative is to remove the filter test because it'll pass even if it should fail.

elephantcatdog commented 2 years ago

The problems with Anchor were further reaching than I thought I should go for this PR, so I made a new issue: https://github.com/iTwin/iTwinUI/issues/904

elephantcatdog commented 2 years ago

I removed the test for filtering navigation as I couldn't find a solution to make it fail/pass correctly.