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

Commit 590e838

Browse files
authored
Merge pull request #40 from github/role
Avoid setting role attribute if attribute is present
2 parents 5c625a0 + 5fd52c4 commit 590e838

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('role', 'button')
199+
if (!summary.hasAttribute('role')) summary.setAttribute('role', 'button')
200200
summary.addEventListener('click', onSummaryClick, {capture: true})
201201
}
202202

0 commit comments

Comments
 (0)