Skip to content

Commit aa2e500

Browse files
committed
fix: forward line SVG id
1 parent 6b559b5 commit aa2e500

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/Line.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const Line: React.FC<ProgressProps> = (props) => {
5050

5151
return (
5252
<svg
53+
id={id}
5354
className={clsx(`${prefixCls}-line`, className)}
5455
viewBox={viewBoxString}
5556
preserveAspectRatio="none"

‎tests/semantic.spec.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe('Semantic', () => {
3030
it('supports explicit progress semantics for lines', () => {
3131
const { container } = render(
3232
<Line
33+
id="download-progress"
3334
percent={25}
3435
role="progressbar"
3536
aria-label="Download progress"
@@ -40,6 +41,7 @@ describe('Semantic', () => {
4041
);
4142

4243
const line = container.querySelector('svg');
44+
expect(line).toHaveAttribute('id', 'download-progress');
4345
expect(line).toHaveAttribute('role', 'progressbar');
4446
expect(line).toHaveAccessibleName('Download progress');
4547
expect(line).toHaveAttribute('aria-valuemin', '0');

0 commit comments

Comments
 (0)