Five icons draw without their geometry: the root's size stripped from every element #85
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observation
and, a minute later:
What is wrong
_icon_sourceincore/templatetags/postulo.pystrips Lucide's fixed 24-pixel size and itsown class, so that one file can serve a 16-pixel glyph and a 48-pixel illustration:
That runs over the whole file, not the root element. Lucide draws an envelope as a flap
and a box:
and the rendered markup came out as:
On a
<rect>, width and height are not a size — they are the shape. Without them therectangle has no extent and draws nothing, which leaves the flap alone: a "V".
How many
Five of the thirty-nine bundled icons have geometry on a child element, and every one of
them has been drawing wrongly since the tag was written:
mailcalendarlayout-dashboardmonitorbriefcaseThree of the five are in the settings sidebar, side by side, which is why they were noticed
together.
Why nothing caught it
tests/test_icons.pychecked that the tag produces an inline<svg>, that it is sized byCSS, hidden from assistive technology, that the names match
assets/icons.txt, and thatpath traversal is refused. Every one of those is about the root element. Nothing looked
at what was inside it, so an icon that rendered as a valid, well-labelled, correctly sized,
empty box passed.
Nor could the accessibility suite help: the icons are
aria-hidden="true"— correctly, theysit beside their own words — so axe has nothing to say about them, and a screen reader reads
the sidebar perfectly either way. This was only ever going to be found by a person looking
at it.
The fix
Strip the root and nothing else:
Three tests come with it: each of the five icons keeps a child's width and height, each
still loses the root's, and the mail icon draws both a flap and an envelope — that last one
stating the reported symptom as itself. The assertions match the attribute rather than the
substring, since
stroke-width="2"containswidth=and must survive.Classification
Bug. Cosmetic in consequence, but it had been shipping in every release and in the container
image, and the one place it could be caught was somebody's eyes.