accessibility-insights-web icon indicating copy to clipboard operation
accessibility-insights-web copied to clipboard

failure instance details: refactor error handling of querySelector to use try/catch

Open karanbirsingh opened this issue 6 years ago • 3 comments
trafficstars

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).

karanbirsingh avatar Aug 29 '19 00:08 karanbirsingh

I would like to help with this issue. Is that ok?

vitokhangnguyen avatar Nov 10 '19 08:11 vitokhangnguyen

hi @vitokhangnguyen our apologies on the delay to reply to this! Yes, if you would like to help that would be awesome.

ferBonnin avatar Dec 19 '19 19:12 ferBonnin

Reviewed with Peter, still a valid bug

ferBonnin avatar May 11 '21 21:05 ferBonnin

After reviewing the full list of issues in our backlog, we have concluded that we will not be addressing this issue.

DaveTryon avatar Jun 29 '23 23:06 DaveTryon