审计修复:前端(模板 / CSS / JS 与无障碍)

- 地图脚本:localStorage 读写走 lsGet/lsSet 兜底(隐私模式下裸访问会打断整段脚本);
  preview() 在 /api/map-config 还没回来时不丢点(previewQueue 在 if (live) 之前排队);
  异步回包一律发序号作废,取消后回来的包不再画
- photo-exif.js:EXIF 时间全 0 不再变成 1899-11-30 写进到访时间;读 count 前先按版本卡宽度
- 数据编辑页:三个筛选表单都把其余条件用隐藏域原样带上,提交不再把别的列表的筛选清掉
- 补全页:sessionStorage 的读写一律包 try(脏数据/隐私模式都会抛)
- 窄屏:删掉被后面同特异性规则盖掉的死内边距;宽表堆叠类名成对、判据扩到所有 tb 表
- 无障碍:图片删除按钮补 aria-label,访客画廊图片补 alt
- report.html 补上漏掉的 </tr>,fog-mask 的宽表带 tb-stack

本批不碰数据库与导出路径:往返包 823/323/8/30/791/557/2246 全等、
坐标偏差 0.000000000、时间偏差 0s、迷雾 8701 块一致。
This commit is contained in:
tamakyi
2026-09-24 20:37:57 +08:00
parent b4c2a8452f
commit d5f6dfa381
18 changed files with 675 additions and 77 deletions
+11 -2
View File
@@ -202,8 +202,17 @@ func checkWideTablesOutsideGrid(t *testing.T, path, body string) int {
}
if !strings.Contains(tag, "tb-stack") {
// 照片表由脚本逐格生成、列数固定,移动端走「隐藏第 3 列」那条路,暂不纳入堆叠。
if inTW && !strings.Contains(tag, "photo-table") {
t.Errorf("%s:.tw 里的表格没带 tb-stack(窄屏没有堆叠规则可命中,只能横滑)", path)
if strings.Contains(tag, "photo-table") {
continue
}
// 判据从「在 .tw 里」扩成「只要用了 tb 这个宽表基类就得堆叠」:
// 漏了 .tw 包裹的宽表(/admin/fog/mask 的遮罩表就是这样)以前两条守卫都看不见。
usesTB := false
if m := classRe.FindStringSubmatch(tag); m != nil {
usesTB = strings.Contains(" "+m[1]+" ", " tb ")
}
if inTW || usesTB {
t.Errorf("%s:宽表没带 tb-stack(窄屏没有堆叠规则可命中,只能横滑):%s", path, tag)
}
continue
}