Skip to content
This repository was archived by the owner on Sep 22, 2022. It is now read-only.

Commit d46cc13

Browse files
committed
Remove aria-haspopup=dialog and add role=button
- aria-haspopup=dialog Using NVDA as an example: nvaccess/nvda#8235 - role=button While the default summary role (disclosure triangle) could be appropriate elsewhere, dialog's trigger element should be announced as a button.
1 parent 91a1435 commit d46cc13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class DetailsDialogElement extends HTMLElement {
196196

197197
const summary = details.querySelector('summary')
198198
if (summary) {
199-
summary.setAttribute('aria-haspopup', 'dialog')
199+
summary.setAttribute('role', 'button')
200200
summary.addEventListener('click', onSummaryClick, {capture: true})
201201
}
202202

0 commit comments

Comments
 (0)