rusackas commented on PR #40160:
URL: https://github.com/apache/superset/pull/40160#issuecomment-4474883338
Heads-up — this PR is no longer a pure version bump. In addition to bumping
oxlint from 1.63.0 to 1.64.0, it disables `jsx-a11y/no-redundant-roles` in
`superset-frontend/oxlint.json`. The new oxlint release enforces that rule,
which flags explicit ARIA roles duplicating an element's implicit role (`<th
role="columnheader">`, `<tr role="row">`, etc.).
The rule is correct in real browsers, but our React tests run in jsdom,
where implicit role inference is incomplete. Following the rule's advice and
stripping those roles breaks RTL queries like `getAllByRole('columnheader')` in
ChartList.listview.test.tsx, DashboardList.listview.test.tsx, and
DatasetList.listview.test.tsx (`Expected length: 8, Received length: 0`).
Two options were considered:
1. **Disable the rule globally** ← what this PR does (1-line change in
`oxlint.json`)
2. Restore the explicit roles in each place oxlint flags + add a per-line
`oxlint-disable` comment — noisier and effectively encodes the same decision.
Option 1 wins because every site the rule fires is a site where we need the
role for tests to work, so we'd just be adding noise per call site. Worth
revisiting if/when we migrate to a test runner that has accurate implicit-role
inference (e.g. happy-dom).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]