Skip to content

Commit fbc810c

Browse files
committed
Removed the irrelevant aria-pressed attribute from the Hamburger component.
1 parent 6281a89 commit fbc810c

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.changeset/early-cows-hide.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@sumup-oss/circuit-ui": patch
3+
---
4+
5+
Removed the irrelevant `aria-pressed` attribute from the Hamburger component.

packages/circuit-ui/components/Hamburger/Hamburger.spec.tsx

-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ describe('Hamburger', () => {
4242
expect(ref.current).toBe(hamburger);
4343
});
4444

45-
it('should have the relevant aria attribute when active', () => {
46-
render(<Hamburger {...baseProps} isActive />);
47-
const button = screen.getByRole('button');
48-
expect(button).toHaveAttribute('aria-pressed', 'true');
49-
});
50-
5145
it('should call the onClick prop when clicked', async () => {
5246
const onClick = vi.fn();
5347
render(

packages/circuit-ui/components/Hamburger/Hamburger.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ export const Hamburger = forwardRef<any, HamburgerProps>(
112112
className={clsx(classes.button, className)}
113113
size={size}
114114
type="button"
115-
aria-pressed={isActive}
116115
ref={ref}
117116
>
118117
{isActive ? activeLabel : inactiveLabel}

0 commit comments

Comments
 (0)