HTML Attribute Occurrence Duplicate Audit
Audit duplicate attribute occurrences under HTML ASCII name lowercase without parsing a tag or losing duplicates; supplied occurrence indexes remain observable.
Description
Audit duplicate attribute occurrences under HTML ASCII name lowercase without parsing a tag or losing duplicates; supplied occurrence indexes remain observable.
Attribute names that differ only in ASCII case can describe duplicate observations. This audit exposes those collisions without discarding their source positions.
When to use this tool
Audit duplicate attribute occurrences under HTML ASCII name lowercase without parsing a tag or losing duplicates; supplied occurrence indexes remain observable.
- Prepare the supplied attributesJson fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter attributesJson. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.duplicates. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Parse attributesJson as name/value objects, reject forbidden name characters and normalize names with ASCII lowercase. Group equal normalized names and report repeated groups with source indexes.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| attributesJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
For the JSON text fields, the following decoded structures show the example records before they are serialized into input strings. Keep field names, list nesting and value types as shown.
[
{
"field": "attributesJson",
"decoded": [
{
"name": "ID",
"value": "a"
},
{
"name": "id",
"value": "b"
},
{
"name": "class",
"value": "c"
}
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.duplicates | The duplicates list in the ordering and representation described above. |
{
"input": {
"attributesJson": "[{\"name\":\"ID\",\"value\":\"a\"},{\"name\":\"id\",\"value\":\"b\"},{\"name\":\"class\",\"value\":\"c\"}]"
},
"output": {
"result": {
"duplicates": [
{
"key": "id",
"indexes": [
0,
1
]
}
]
}
}
} Limitations and assumptions
- The input is an observation list rather than HTML markup. The audit does not decide which occurrence a consumer should keep.
- All declared input fields are required and unexpected top-level fields are rejected. Numbers must be finite; lists are limited to 128 entries and ordinary text fields to 8,192 UTF-16 code units, with tighter limits where stated.
- JSON text inputs must parse within bounded nesting and size limits. Numeric outputs outside the safe finite range are rejected; large exact integer results use decimal strings. Indexes and half-open spans are zero-based unless a rank is explicitly described as one-based.
Alternative or Complementary methods
For actual document behavior, inspect a parsed DOM and the relevant HTML algorithm. These tools transform supplied tokens, observations or coordinates; compare the browser result when parsing or layout matters.
References
Similar or alternative tools
- HTML Attribute Occurrence Last Wins
Apply an explicit last-occurrence-wins policy to supplied HTML attribute observations, preserving winning source indexes; browsers’ tokenizer normally uses first wins instead.
- aria state attribute pair checker
ARIA states expose changing interface conditions through defined attribute/value tokens.