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

Commit

Permalink
Remove aria-haspopup=dialog and add role=button
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
muan committed May 7, 2019
1 parent 91a1435 commit d46cc13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class DetailsDialogElement extends HTMLElement {

const summary = details.querySelector('summary')
if (summary) {
summary.setAttribute('aria-haspopup', 'dialog')
summary.setAttribute('role', 'button')
summary.addEventListener('click', onSummaryClick, {capture: true})
}

Expand Down

0 comments on commit d46cc13

Please sign in to comment.