accessibility-insights-web
accessibility-insights-web copied to clipboard
failure instance details: refactor error handling of querySelector to use try/catch
from incomplete PR #1072:
QuerySelector() is an HTML Element Utils method that takes a path and finds the corresponding element. We use it to retrieve a snippet based on a path. The method returns null if the path doesn't map to a snippet, but we recently realized it will just hang if given a path which follows incorrect syntax. I at first thought it was only in the case that the path started with a comma, but soon realized there were more cases (like when the path started with a number). For this reason, I modified the code to not try and test the path for all potentially failing edge cases (as is in the code base currently to fix commas specifically), but instead wrap the call in a try/catch statement.
It looks like the PR had decent progress (failing unit tests).
I would like to help with this issue. Is that ok?
hi @vitokhangnguyen our apologies on the delay to reply to this! Yes, if you would like to help that would be awesome.
Reviewed with Peter, still a valid bug
After reviewing the full list of issues in our backlog, we have concluded that we will not be addressing this issue.