Comment by sa46
2 days ago
> Where is the native HTML datagrid
Which parts of a datagrid should a browser provide? I'm familiar with AG Grid [1] and the API surface is enormous. Aligning browsers on a feature set would be challenging.
Maybe there's a core set of functionality, like Flutter's GridView or QML https://doc.qt.io/qt-6/qml-qtquick-gridview.html.
The simplest would be to follow the aria role=“grid” spec, ideally with sortable columns. IMO it doesn’t need the kitchen sink AG Grid approach just a sane way to semantically build a data grid with proper accessibility.
https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/data-...
It has to handle every possible use case for a grid. You’re thinking of your use case. The spec needs to handle everything else. I don’t see how that’s manageable.
Does it though?
A good spec really only needs clear principles. At a minimum, it should clearly explain what it does do, and also clearly explain what it does not do.
You don't need to have every edge case covered to build an API for datagrids. iOS has had native DataGrids for ages, Windows, macOS, Android. They all have this stuff built in. Other platforms have figured out how to provide these API surfaces.
Why does the web have to be seen as a special unicorn that can't have good baseline components like these platforms?
1 reply →
At minimum filtering and sorting should be handled by the browser, including async for both of those.
Pagination could be argued as well, but at least that's simple-ish to implement (but still, it's such a common UI pattern that it ought to be handled in a unified way by browsers IMO)
3 replies →