Claude-skill-registry html-standards
HTML standards for Oh My Brand! theme. Semantic elements, accessibility requirements, ARIA attributes, and attribute best practices. Use when writing HTML templates or render output.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/html-standards" ~/.claude/skills/majiayu000-claude-skill-registry-html-standards && rm -rf "$T"
manifest:
skills/data/html-standards/SKILL.mdsource content
HTML Standards
HTML standards and accessibility requirements for the Oh My Brand! WordPress FSE theme.
When to Use
- Writing block render templates (
)render.php - Creating HTML structure for Web Components
- Ensuring accessibility compliance
- Adding proper ARIA labels and attributes
Reference Files
| File | Purpose |
|---|---|
| gallery-block.html | Complete semantic structure example |
| aria-patterns.html | Live regions, tabs, dialogs, expandable |
| image-patterns.html | Alt text, lazy loading, LCP optimization |
| interactive-elements.html | Buttons, links, forms |
Semantic Element Usage
| Element | Usage |
|---|---|
| Self-contained content (blocks, posts) |
| Thematic grouping of content |
| Introductory content or navigational aids |
| Navigation links |
| Main content of the document |
| Tangentially related content |
| Footer of section or page |
| Self-contained content like images |
| Caption for a figure |
| Disclosure widget (expandable) |
| Summary for details element |
Heading Hierarchy
Maintain logical heading hierarchy (never skip levels):
<!-- ✅ Correct hierarchy --> <h1>Page Title</h1> <h2>Section Title</h2> <h3>Subsection Title</h3> <!-- ❌ Skip levels --> <h1>Page Title</h1> <h3>Missing h2!</h3>
Image Attributes
| Attribute | Purpose |
|---|---|
| Alternative text for accessibility |
/ | Prevents layout shift (CLS) |
| Defers off-screen images |
| First image (LCP optimization) |
| Non-blocking decode |
| Prioritize LCP image |
See image-patterns.html for complete examples.
Button Attributes
| Attribute | Purpose |
|---|---|
| Prevents form submission |
| Accessible name when text insufficient |
| Toggle state for expandable content |
| ID of controlled element |
| Disables interaction |
Link Attributes
| Attribute | Purpose |
|---|---|
| Opens in new tab |
| Security for new tab links |
| Triggers file download |
ARIA Patterns
Live Regions
| Attribute | When to Use |
|---|---|
| Non-urgent updates (status messages) |
| Urgent updates (errors) |
| Error messages |
| Announce entire region |
Expandable Content
| Attribute | Purpose |
|---|---|
| Current expanded state |
| ID of controlled panel |
| Hide collapsed content |
Tabs
| Attribute | Purpose |
|---|---|
| Container for tabs |
| Individual tab button |
| Tab content panel |
| Currently selected tab |
| Links tab to panel |
| Links panel to tab |
Modal Dialog
| Attribute | Purpose |
|---|---|
| Links to dialog title |
| Links to description |
| Indicates modal behavior |
See aria-patterns.html for complete examples.
Form Input Attributes
| Attribute | Purpose |
|---|---|
| Input type (email, tel, url, etc.) |
| Links to label |
| Form data key |
| Required field |
| Autofill hint |
| Links to description/error |
| Invalid state |
Related Skills
- php-standards - PHP output escaping
- css-standards - Accessibility styling
- web-components - Web Component HTML structure
- native-block-development - Block render templates