Skip to content

Commit de79092

Browse files
committed
Remove semantically incorrect aria-haspopup attribute from ThemeButton
1 parent e1c7660 commit de79092

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/ThemePicker/ThemeButton.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import styles from './themeButton.module.css'
2121
aria-expanded="false"
2222
aria-controls="theme-picker-panel"
2323
aria-label="toggle theme switcher"
24-
aria-haspopup="true"
2524
data-theme-toggle
2625
>
2726
{/** Intentionally not using Icon component. */}

src/components/ThemePicker/client/__tests__/index.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('ThemePicker Component', () => {
107107
await renderThemePickerDom(({ window }) => {
108108
const toggleBtn = getToggleButton(window.document)
109109
expect(toggleBtn.getAttribute('aria-label')).toBe('toggle theme switcher')
110-
expect(toggleBtn.getAttribute('aria-haspopup')).toBe('true')
110+
expect(toggleBtn.getAttribute('aria-haspopup')).toBeNull()
111111
})
112112
})
113113

@@ -157,7 +157,7 @@ describe('ThemePicker Component', () => {
157157
const toggleBtn = getToggleButton(window.document)
158158
expect(toggleBtn.getAttribute('aria-expanded')).toBe('false')
159159
expect(toggleBtn.getAttribute('aria-controls')).toBe('theme-picker-panel')
160-
expect(toggleBtn.getAttribute('aria-haspopup')).toBe('true')
160+
expect(toggleBtn.getAttribute('aria-haspopup')).toBeNull()
161161
})
162162
})
163163

0 commit comments

Comments
 (0)