From 124ea3cb832db5e9ab0af7ddb5a601f28824fd6d Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Tue, 20 Jan 2026 16:46:12 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B8=85=E7=90=86=E5=B7=B2=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E7=9A=84=E4=BB=BB=E5=8A=A1=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SECURITY_ACCESSIBILITY_FIXES.md | 115 - style.css.bak | 16516 ++++++++++++++++++++++++++++++ 2 files changed, 16516 insertions(+), 115 deletions(-) delete mode 100644 SECURITY_ACCESSIBILITY_FIXES.md create mode 100644 style.css.bak diff --git a/SECURITY_ACCESSIBILITY_FIXES.md b/SECURITY_ACCESSIBILITY_FIXES.md deleted file mode 100644 index 313a1b6..0000000 --- a/SECURITY_ACCESSIBILITY_FIXES.md +++ /dev/null @@ -1,115 +0,0 @@ -# 安全性、辅助功能、兼容性和性能修复计划 - -## 1. CSS 兼容性修复 - -### 需要修复的属性顺序问题 -- `backdrop-filter` 应该在 `-webkit-backdrop-filter` 之后 -- `user-select` 应该在 `-ms-user-select` 之后 -- `width: max-content` 应该在 `width: -moz-max-content` 之后 -- `height: max-content` 应该在 `height: -moz-max-content` 之后 - -### 需要添加的浏览器前缀 -- `text-size-adjust` 需要添加 `-webkit-` 前缀 -- 所有 `user-select` 需要完整的前缀支持 - -## 2. 安全性修复(需要后端配置) - -### HTTP 头部修复 -这些需要在服务器配置或 PHP 中修复: - -```php -// functions.php 中添加 -function argon_security_headers() { - // 移除 Pragma 头(已废弃) - header_remove('Pragma'); - - // 简化 Server 头 - header('Server: Argon'); - - // 使用 CSP 替代 X-Frame-Options - header("Content-Security-Policy: frame-ancestors 'self'"); - header_remove('X-Frame-Options'); - - // 设置正确的字符集 - header('Content-Type: text/html; charset=utf-8'); - - // 缓存控制 - if (!is_admin()) { - header('Cache-Control: public, max-age=31536000, immutable'); - } -} -add_action('send_headers', 'argon_security_headers'); -``` - -## 3. 辅助功能修复 - -### 需要修复的 HTML 结构 -1. 按钮缺少可识别文本 - 添加 `aria-label` 或 `title` -2. ARIA 角色层级问题 - 修复 tab/tablist 结构 -3. 表单元素缺少标签 - 添加 `