Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/loader-aria-accessibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@cloudflare/kumo": patch
---

fix(loader): add ARIA attributes for screen reader accessibility

Added `role="status"` and `aria-label="Loading"` to the Loader SVG component to make it accessible to screen readers. This resolves a WCAG 2.1 SC 4.1.3 (Status Messages) violation where assistive technology users received no indication that content was loading.
2 changes: 2 additions & 0 deletions packages/kumo/src/components/loader/loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export const Loader = ({
stroke="currentColor"
className={className}
style={{ height: sizeValue, width: sizeValue }}
role="status"
aria-label="Loading"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a prop with a default value of "loading" so that we can ultimately pass a translated string down where we consume this?

>
<circle
cx="12"
Expand Down
Loading