[FlexTable] Disable tabindex on rows
See original GitHub issueWould it be possible to have an option to disable the tabindex on rows like you can disable the tabindex on the complete FlexTable by using tabIndex={null}
?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
GWT. How to change flex table's column width? - Stack Overflow
Try FlexTable.getColumnFormatter().setWidth(column, width);. For example, I just tried table.getColumnFormatter().setWidth(0, "400px");.
Read more >flextable.pdf
The values are inserted in existing columns of the input data of the flextable. Rows can be inserted at the top or the...
Read more >Bootstrap Cheat Sheet v441 To Help With Web Development
</h1> <div class="row"> <div class="col-sm-6">Left Column</div> <div ... flex, inline-flex, table, table- cell, print-table-row) .disabled .display-(1, 2, ...
Read more >A Responsive Accessible Table - Adrian Roselli
The table from the example with CSS disabled as heard in NVDA. I am using table navigation controls. NVDA announces the number of...
Read more >react-virtualized | Yarn - Package Manager
... height is no longer subtracted from overall (rows) height if header is disabled. ... role , and tabIndex get attached to FlexTable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bvaughn sorry to bring this back from the dead, but I’ve just run into it trying to make my app accessible, and I don’t think you’re totally right. Right now, I don’t agree the current tabindex behaviour is a11y friendly.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets is a good guide to this. The relevant snippet:
This references the WAI-ARIA Authoring Practices, which has a lot more detailed content on this. There’s a few relevant points in there, but it very closely agrees with the MDN summary, e.g. under ‘Fundamental Keyboard Navigation Conventions’:
Right now, because tabindex=0 is set on all rows within the table, these recommendations aren’t followed, and indeed are impossible to follow. Every single row of the table, and the table itself, are treated as top-level UI components, which isn’t correct and is hard to use.
Instead, the table should have tabindex=0, rows within should have tabindex=-1, and JS should be used to ensure that the arrow keys manage focus within those rows correctly. MDN has two recommended approaches to do exactly that: https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets#Managing_focus_inside_groups.
If you want to really dig into it, there’s an ‘interactive tabular data’ section in the ARIA doc that exactly describes this case and covers the suggested behaviour & keyboard shortcuts in full: https://www.w3.org/TR/wai-aria-practices-1.1/#grid
For now I’m going to fix this in my app by replacing the table rowRenderer to fix tabindexes, and managing focus with onKeyDown. Would you be interested in a PR to apply that change here too?
@bvaughn I have two tables side by side in some type of container with two search fields above. I want that the user is to be able to switch with Tab between these search fields. There should be at the maximum the focus-step to the table between these two. Additionally the table itself implements an onRowClick and an onRowDoubleClick. The double click action is the main action. I want to implement a keyboard control with the arrow keys (up and down) for the onRowClick action and a Space or Enter for the onRowDoubleClick action. But this is not possible if the tabIndex is active on the rows. The selection (or focus) that is done by the arrow keys or the click handler is a Redux action. I want to be able to control the focus from outside by actions.