fix: [M3-7155] - Link Accessibility & Markup on Billing Detail page#9697
fix: [M3-7155] - Link Accessibility & Markup on Billing Detail page#9697abailly-akamai merged 6 commits intolinode:developfrom
Conversation
| {text} | ||
| </Button> | ||
| </> | ||
| </CSVLink> |
There was a problem hiding this comment.
Here we use the CSV link as the accessible element rather than the button. (also, downloads are semantically links with href)
Rendering the as a span is a decent way to keep the styling identical while being semantically correct (buttons are not permitted within <a> tags)
Content model: Transparent, but there must be no interactive content descendant.
The a element may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e.g. buttons or other links).
| <Grid sm={4} sx={sxGrid} xs={12}> | ||
| <Link to={`/account/billing`} data-qa-back-to-billing> | ||
| <Link | ||
| accessibleAriaLabel="Back to Billing" |
There was a problem hiding this comment.
This is the missing tag/accessibility support causing the console error:
https://github.com/linode/manager/blob/develop/packages/manager/src/components/Link.tsx#L83-L88
It works! 🎉
| filename: string; | ||
| headers: { key: string; label: string }[]; | ||
| onClick: () => void; | ||
| onClick?: () => void; |
There was a problem hiding this comment.
Looks like we still may need the onClick support on the MaintenanceTable component
|
Thanks for tackling this, @abailly-akamai ! Interestingly, even with the I'll attach screen recordings to M3-7155 momentarily which can probably do a better job explaining what I'm seeing |
|
@jdamore-linode thanks for that! the |
jdamore-linode
left a comment
There was a problem hiding this comment.
@abailly-akamai Thanks, looks great! Confirmed that the label is announced by VoiceOver and that the focus/activation behavior when using keyboard navigation is fixed. Also pushed a quick test fix for the Download CSV and Download PDF buttons
coliu-akamai
left a comment
There was a problem hiding this comment.
🎉 Tested:
- no console warnings for link accessibility
- Download CSV link works as expected
- voiceover sounded good for the back to billing link / included 'Back to billing' in the voiceover and other links/buttons
- UI looks good (matches the develop branch -- prod doesn't have the Region column in the invoice table yet, so I didn't check against there)
Description 📝
Small PR to improve accessibility and markup on the Billing Detail page since those were bothering me and throwing warnings in the console.
Major Changes 🔄
Preview 📷
This PR should contain no visual regression and should be tested against any.
How to test 🧪
Local Setup:
Pull and run code locally
Steps: