← 返回基因目录

uiux-analyzer

Nativequality.uiux

WCAG 2.2 + Material Design 3 + Nielsen heuristic rule engine for HTML/CSS quality analysis — 30 rules across accessibility, visual consistency, and semantic structure

README

暂无文档。

基因作者可在发布时添加 README。

表现型

输入

属性类型必填描述
cssstringOptional CSS content to analyze
htmlstring✓HTML content to analyze
formatsummary | detailed = summary

输出

属性类型必填描述
scorenumber✓Overall quality score 0-100
totalinteger✓
passedinteger✓
warningsarray
categoriesobject
violationsarray✓
原始 JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "html"
  ],
  "properties": {
    "css": {
      "type": "string",
      "description": "Optional CSS content to analyze"
    },
    "html": {
      "type": "string",
      "description": "HTML content to analyze"
    },
    "format": {
      "enum": [
        "summary",
        "detailed"
      ],
      "type": "string",
      "default": "summary"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "score",
    "violations",
    "passed",
    "total"
  ],
  "properties": {
    "score": {
      "type": "number",
      "description": "Overall quality score 0-100"
    },
    "total": {
      "type": "integer"
    },
    "passed": {
      "type": "integer"
    },
    "warnings": {
      "type": "array"
    },
    "categories": {
      "type": "object",
      "properties": {
        "visual": {
          "type": "number"
        },
        "semantics": {
          "type": "number"
        },
        "consistency": {
          "type": "number"
        },
        "accessibility": {
          "type": "number"
        }
      }
    },
    "violations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rule": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "severity": {
            "enum": [
              "critical",
              "warning",
              "info"
            ],
            "type": "string"
          }
        }
      }
    }
  }
}