zmuxuny opened a new pull request, #7130:
URL: https://github.com/apache/rocketmq-dashboard/pull/7130
### Which Issue(s) This PR Fixes
Fixes #7126
### Brief Description
The Grafana-dashboard and alert-rule asset catalogs expose a searchbox and a
tag/severity combobox with empty accessible names. Their placeholders do not
label the controls, and the search placeholder disappears once an operator
types.
Give both filter bars stable, localized accessible names using the existing
English/Chinese translations. No filtering, fetching, layout, dependency, or
translation changes.
### How Did You Test This Change?
Four real-component regressions cover both catalogs in English and Chinese,
before and after search input. Against unchanged production, all sixteen
accessible-name assertions fail with an empty received name. The fixed controls
keep their names after input, and existing search/tag/severity filtering tests
remain green.
From `web/`:
```sh
npx vitest run src/components/__tests__/AlertRuleAssetList.test.tsx \
src/components/__tests__/GrafanaDashboardList.test.tsx \
src/services/alertRuleAssetService.test.ts
src/services/grafanaService.test.ts \
src/i18n --pool=threads --maxWorkers=1
# 7 files, 54 tests passed
npx tsc -b --force
npx eslint src/components/AlertRuleAssetList.tsx
src/components/GrafanaDashboardList.tsx \
src/components/__tests__/AlertRuleAssetList.test.tsx \
src/components/__tests__/GrafanaDashboardList.test.tsx
npx prettier --check src/components/AlertRuleAssetList.tsx
src/components/GrafanaDashboardList.tsx \
src/components/__tests__/AlertRuleAssetList.test.tsx \
src/components/__tests__/GrafanaDashboardList.test.tsx
git diff --check
```
### Checklist
- [x] One coherent accessibility fix with both affected catalog filter bars
- [x] Conventional Commit and `...Test` regression names
- [x] Existing localized strings and ASF headers reused
- [x] Independent production and test review completed
- [ ] Backend architecture suite, not run for this frontend-only change
AI assistance was used to investigate, implement, review, and verify the
change. No live cluster was contacted.
--
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]