You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
micahgodbolt
changed the title
[Bug]: as attribute with "tr" value doesn't work on DataGridRow
[Bug]: DataGrid - as attribute doesn't work on DataGridRow
Jan 8, 2024
Using native semantic table elements means that all other elements must be semantic table elements. Due to the restrictions there and the fact that DataGrid renders as role="grid", we made the decision to not allow semantic table element toggling in this component.
Is there a reason why rendering DataGrid as semantic table elements would be preferrable? The case you're drescribing now should not be supported since you would be rendering tr for rows but div for everything else
What should the end result look like? do you expect the DataGrid to render completely with semantic table elements? (tbody, tr, td etc...?)
The DataGrid by default does not use semantic elements, because it needs to be a role="grid" for screen reader narration, because tables should not have keyboard navigation/selection semantics. Even if the DataGrid rendered semantic table elements the default roles would need to be override to the grid variants so there's no real benefit I can see of using semantic table elements.
Library
React Components / v9 (@fluentui/react-components)
System Info
.
Are you reporting Accessibility issue?
None
Reproduction
https://codesandbox.io/p/sandbox/condescending-browser-r8gr2y?file=%2Fsrc%2Fexample.tsx%3A9%2C16
Bug Description
Actual Behavior
When
as="tr"
is set on<DataGridRow as="tr">
it still renders as<div role="row">
Expected Behavior
When
as="tr"
is set on<DataGridRow as="tr">
it should be rendered as<tr>
Logs
No response
Requested priority
High
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
The text was updated successfully, but these errors were encountered: