gabriel / muse public
feat minor html task/html-ast-resolution #1 / 1
AI Agent gabriel · 168 days ago · Apr 13, 2026 · Diff

feat(html): maximum resolution HTML symbol extraction

Name-resolution priority (highest → lowest): 1. id attr → tag#id 2. aria-label → tag[label] (was missing entirely) 3. name attr → tag[name] (form/fieldset/slot — was missing) 4. heading text → h1: text / h2: text 5. child heading → tag: child-h text (section: About Us vs section@42) 6. @lineno — last resort only

New symbol sources: - _HTML_LABEL_TAGS: summary, figcaption, legend, caption — text content as name - Custom elements (hyphenated tags): extracted when id/aria-label present - _HTML_SEMANTIC_TAGS expanded: details, summary, template, slot, fieldset

Refactor: - _find_id_attr → _find_attr(start_tag, src, attr_name) (generalized) - _find_child_heading() added: first h1-h6 child text

Tests: 25 HTML tests (was 7), all 206 pass

sha256:44ac851e7a455241f4e2cf50d5ae2675276716750f394cbc5ec7d5144859055f sha
+22 ~8 −1 symbols
sha256:cb7cc415e2e4d982723621b44be6ddc249996ee4522a4fb9befa7036d30a3ed5 snapshot
+22
symbols added
~8
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes 31 symbols
~ muse/plugins/code/ast_parser.py .py 4 symbols added, 1 symbol removed, 3 symbols modified
− _find_id_attr method method _find_id_attr L1263–1275
+ _find_attr method method _find_attr L1316–1328
+ _find_child_heading method method _find_child_heading L1330–1351
+ _HTML_HEADINGS variable variable _HTML_HEADINGS L1169–1169
+ _HTML_LABEL_TAGS variable variable _HTML_LABEL_TAGS L1173–1173
~ tests/test_code_plugin.py .py 18 symbols added, 5 symbols modified
+ test_aria_label_beats_lineno method method test_aria_label_beats_lineno L1768–1771
+ test_aria_label_nav method method test_aria_label_nav L1764–1766
+ test_article_with_child_h3 method method test_article_with_child_h3 L1821–1823
+ test_child_heading_not_emitted_twice method method test_child_heading_not_emitted_twice L1825–1830
+ test_content_id_differs_for_different_content method method test_content_id_differs_for_different_content L1874–1880
+ test_content_id_present method method test_content_id_present L1868–1872
+ test_custom_element_with_aria_label method method test_custom_element_with_aria_label L1840–1842
+ test_custom_element_with_id method method test_custom_element_with_id L1836–1838
+ test_fieldset_name_attr method method test_fieldset_name_attr L1781–1783
+ test_figcaption_text_extracted method method test_figcaption_text_extracted L1805–1807
+ test_form_name_attr method method test_form_name_attr L1777–1779
+ test_h2_heading_extracted method method test_h2_heading_extracted L1797–1799
+ test_id_name_format method method test_id_name_format L1750–1752
+ test_legend_text_extracted method method test_legend_text_extracted L1809–1811
+ test_section_with_child_heading method method test_section_with_child_heading L1817–1819
+ test_slot_name_attr method method test_slot_name_attr L1785–1787
+ test_summary_text_extracted method method test_summary_text_extracted L1801–1803
+ test_template_with_id method method test_template_with_id L1848–1850
← Older Oldest on task/html-ast-resolution
All commits
Newer → Latest on task/html-ast-resolution

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:44ac851e7a455241f4e2cf50d5ae2675276716750f394cbc5ec7d5144859055f --body "your comment"