Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Attachment
  3. Accessibility

Attachment

Accessibility

Import Attachment, AttachmentMediaKind, Attachments, getAttachmentMediaMeta, normalizeMediaType from @prepared911/ui/attachment.
Structure
  • Attachments is a list with an explicit role="list" (Box adds it to a ul), because WebKit exposes a list without markers as a group and VoiceOver would not announce the file count. A screen reader announces how many files a message carries. aria-label names it and is optional: the chips name themselves.
  • Each chip is a list item. Its content reads in order: file name, then the supporting line. The glyph and the thumbnail are decorative, because the name is beside them.
Remove control
The remove control is a native button named by removeLabel, such as "Remove requirements.pdf", so the name says which file it removes. It is type="button". Its tooltip repeats the name visually and is not read twice.
Kind is not color alone
The tile is tinted by the kind of file, and the glyph differs by kind too (document, image, video, microphone, code). The supporting line states the type.
Contrast and forced colors
Each tile tint and its glyph use a status or accent fill with its matching foreground. The browser tests run axe over every kind in light and dark. Under forced-colors: active fills are removed, so the tile gets an edge and takes the system colors.
Truncation
A long file name truncates with an ellipsis and keeps the full name in title. The chip never grows past its container, and chips wrap onto new rows.
Right to left
The tile comes first and the remove control last in reading order, so they swap sides with the direction.
Previous
Attachment / API and Development
Next
Avatar / Usage
On this page
Structure
Remove control
Kind is not color alone
Contrast and forced colors
Truncation
Right to left