Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: aria alignment #100

Merged
merged 12 commits into from
Nov 12, 2024
4 changes: 2 additions & 2 deletions src/components/ProgressBar/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tremor ProgressBar [v0.0.2]
// Tremor ProgressBar [v0.0.3]

import React from "react"
import { tv, type VariantProps } from "tailwind-variants"
Expand Down Expand Up @@ -75,7 +75,7 @@ const ProgressBar = React.forwardRef<HTMLDivElement, ProgressBarProps>(
"relative flex h-2 w-full items-center rounded-full",
background(),
)}
aria-label="progress bar"
aria-label="progressbar"
aria-valuenow={value}
aria-valuemax={max}
>
Expand Down
6 changes: 6 additions & 0 deletions src/components/ProgressBar/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Tremor ProgressBar Changelog

## 0.0.3

### Changes

- Fix: Acessibility ARIA roles

## 0.0.2

### Changes
Expand Down
21 changes: 12 additions & 9 deletions src/components/ProgressCircle/ProgressCircle.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tremor ProgressCircle [v0.0.2]
// Tremor ProgressCircle [v0.0.3]

import React from "react"
import { tv, VariantProps } from "tailwind-variants"
Expand Down Expand Up @@ -73,20 +73,23 @@ const ProgressCircle = React.forwardRef<SVGSVGElement, ProgressCircleProps>(
const { background, circle } = progressCircleVariants({ variant })
return (
<>
<div className={cx("relative")} tremor-id="tremor-raw">
<div
className={cx("relative")}
role="progressbar"
aria-label="progress bar"
aria-valuenow={value}
aria-valuemin={0}
aria-valuemax={max}
data-max={max}
data-value={safeValue ?? null}
tremor-id="tremor-raw"
>
<svg
ref={forwardedRef}
width={radius * 2}
height={radius * 2}
viewBox={`0 0 ${radius * 2} ${radius * 2}`}
className={cx("-rotate-90 transform", className)}
role="progress circle"
aria-label="progress bar"
aria-valuenow={value}
aria-valuemin={0}
aria-valuemax={max}
data-max={max}
data-value={safeValue ?? null}
{...props}
>
<circle
Expand Down
6 changes: 6 additions & 0 deletions src/components/ProgressCircle/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Tremor ProgressCircle Changelog

## 0.0.3

### Changes

- Fix: Acessibility ARIA roles

## 0.0.2

### Changes
Expand Down
Loading