Icon-only links named by aria-label are silently dropped by HtmlTransformer
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 66/100
Research direction
Start at the HtmlTransformer entry point and locate its existing transformation tests. Trace how links with no text content are handled, then add neutral fixtures for icon-only links in a list item and a paragraph. Done when each control preserves its href and accessible name, or the run emits a named diagnostic.
Written by the indexing model from the issue text.
Description
Summary
HtmlTransformer drops a link whose only content is an icon element named through aria-label. The interactive control disappears silently: there is no text, so content conservation reports no loss, and no fallback diagnostic is emitted either.
Reproduction
(new HtmlTransformer())->transform('<ul class="pager"><li><a href="/journal/page/2/">2</a></li><li><a href="/journal/page/2/"><span class="icon icon-chevron-right" role="img" aria-label="Next" title="Next"></span></a></li></ul>')->toArray()['serialized_blocks'];
The output keeps only the 2 list item. The Next control and its list item are gone. The result is the same with or without an icon-font class on the span.
Real-world impact
On a captured Odoo blog listing, the pager's previous/next chevrons (<span class="oi oi-chevron-left|right" role="img" aria-label="Previous|Next">) vanish from the imported page. Only numbered links remain.
Expected
A link with an accessible name keeps its control. One option: preserve the icon element with its accessible name, for example as an icon-bearing link in rich text, with aria-label kept. If that is not representable, report an explicit diagnostic instead of dropping the control silently. When nothing else in the control carries text, conservation should treat the link's accessible name as text that must survive.
Acceptance
A neutral fixture covering an icon-only link inside a list item and in a paragraph. The control survives with its href and accessible name, or the run emits a named diagnostic.
Investigated and drafted by Claude Opus (Claude Code via Roadie) from a real import run.
- Dominant language
- PHP
- Stars
- 28
- Forks
- 5
- Avg merge
- 2h 59m
- Merged PRs (30d)
- 942
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/blocks-engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Automattic/blocks-engine#6318 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#4943 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/blocks-engine#4942 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Automattic/blocks-engine#4921 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Automattic/blocks-engine#775 ·
Maintainers usually reply within 1 day
All issues in Automattic/blocks-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TYPO3-Solr/ext-solr#4850 ·
Maintainers usually reply within 2 days
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Opensync-en
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Opensync-en
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Перевод устарел
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
glpi-project/glpi#26353 · 2 comments ·
Maintainers usually reply within 1 day