department-of-veterans-affairs / va-mobile-library

https://department-of-veterans-affairs.github.io/va-mobile-library/
ISC License
0 stars 0 forks source link

Link component - Post-MVP - Enhance Attachment type support to include size #184

Open TimRoe opened 4 months ago

TimRoe commented 4 months ago

Description

Split from ticket #183 as optional post-MVP convenience enhancement for apps.

As this is post-MVP, gather feedback from package consumers on desired behavior.

Acceptance Criteria

Note: See AttachmentLink flagship component for behavior to emulate/improve - [ ] For attachment type, add `size` (optional) prop for the attachment file size in bytes (number) - [ ] When the size property is sent, it should append ` (## [Bytes/KB/MB])` after the text of the link - As part of this, it should pull over logic to handle both the display of Bytes/KB/MB as well as the a11yLabel of saying "kilobytes" and "megabytes" - [ ] Expose these util functions to consumers of the components package so if they chose to display the size differently (e.g. [below the link like VADS](https://design.va.gov/patterns/ask-users-for/files#review)) then they could do so consistently **Accessibility Requirements** Indicated in ACs above as well. - [ ] Ensure support for "KB" and "MB" sizes to be read appropriately by screen reader