# `html-cem/no-unknown-attr`

Disallow attributes on a known custom element that are not declared in its Custom Elements Manifest.

## Why

Misspelled or invented attributes are silently ignored at runtime. The CEM is the source of truth for a component's contract.

## Rule details

For each tag whose name contains `-` and is present in a loaded CEM, every attribute is checked. An attribute is flagged unless:
- It appears in the element's `attributes[]` in the CEM, OR
- It is a global HTML attribute (`id`, `class`, `style`, `slot`, `part`, etc.), OR
- It starts with `aria-`, `data-`, or `on`.

Tags not present in any CEM are skipped — `no-unknown-element` handles those.

## Examples

CEM declares `my-button` with attribute `label`.

❌ Incorrect

```html
<my-button labl="Save"></my-button>
```

✅ Correct

```html
<my-button label="Save"></my-button>
<my-button label="Save" class="hero" data-id="1" aria-label="Save"></my-button>
```
