# @devtools-ds/table A flexible table component, modeled after the network inspector in Chrome and FireFox. ## Installation ```sh npm i @devtools-ds/table # or with yarn yarn add @devtools-ds/table ``` Then to use the component in your code just import it! ```js import { Table } from "@devtools-ds/table"; ``` ## Accessibility Approach There isn't a well-established pattern for this interaction, besides being a [data grid](https://www.w3.org/TR/wai-aria-practices/examples/grid/dataGrids.html). However, data grids usually select each cell not the whole row. I stared by looking at the interactions used in Chrome and FireFox, but they had some issues. In both implementations, the view changes on move without the user selecting a new node, and tab vs. arrow behavior could be unpredictable. For these reasons, I simplified the whole interaction and separated focus from the selected state in the table. Users can navigate focus using tab, arrow keys, or page navigation keys. Selecting a row requires clicking or keyboard entry. Rows are labelled as selected using `aria-selected` within the grid pattern. ## Usage ```js import { Table } from "@devtools-ds/table"; export const BasicUsage = () => { const [selected, setSelected] = React.useState(""); return (
Tyler Krupicka 📖 🎨 💻 💡 ⚠️ |
Andrew Lisowski 💻 |
Adrian de la Rosa 📖 💡 💻 |