ziolko / aria-devtools

Easily spot missing ARIA labels, misused ARIA roles, and incomplete keyboard support in your web applications.
https://chrome.google.com/webstore/detail/aria-devtools/dneemiigcbbgbdjlcdjjnianlikimpck?hl=en
MIT License
385 stars 12 forks source link

Bugfix: Treat text content as optional when computing node name #23

Closed sgregson closed 2 years ago

sgregson commented 2 years ago

Why

There are some occasions where the textElement.text may be undefined, resulting in the bug seen in #21.

What

Details

Logic like getAccessibleNameOf() here seem to imply that the text field shouldn't be optional. I'm not exactly sure what the root cause making textElement.text === undefined actually is.

If it's not supposed to be optional, this patch doesn't solve the root cause.


fixes #21

ziolko commented 2 years ago

Hi, thank you for this great contribution. I am currently on vacation and will look at this and release at the beginning of the next week :)

Cheers, Mateusz

sgregson commented 2 years ago

Glad to contribute! Aria-devtools is my go-to resource when teaching peers how to code advanced widgets like carousels and tabbed layouts.

Feel free to close the PR - I'll look out for the updates in the latest release and close if it's still open.

ziolko commented 2 years ago

Sounds good :) I am closing this PR in this case.