Skip to content

Commit 8850f23

Browse files
authored
fix: aria-hidden attribute was ignored in suggestion on hover (#104)
1 parent 2b2c6fa commit 8850f23

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib/queryAdvise.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ export function getData({ rootNode, element }) {
1616
const labelText = labelElem ? labelElem.innerText : null;
1717

1818
return {
19-
role:
20-
element.getAttribute('role') ||
21-
// input's require a type for the role
22-
(tagName === 'INPUT' && type !== 'text' ? '' : getRole(element)),
19+
role: element.getAttribute('aria-hidden')
20+
? undefined
21+
: element.getAttribute('role') ||
22+
// input's require a type for the role
23+
(tagName === 'INPUT' && type !== 'text' ? '' : getRole(element)),
2324
name: computeAccessibleName(element),
2425
tagName: tagName,
2526
type: type,

0 commit comments

Comments
 (0)