equal-access icon indicating copy to clipboard operation
equal-access copied to clipboard

[BUG][Extension] Checker doesn't select SVG elements when clicking on violation

Open carmacleod opened this issue 4 years ago • 2 comments

This is a follow-on to https://github.com/IBMa/equal-access/issues/346#issuecomment-988873277.

Steps:

  • Run Checker on this page: https://w3c.github.io/html-aria/tests/svg-test.html
  • In the list of violations, expand one of the violations for one of the SVGs
  • Click on the violation

I expected the SVG element that was in error to be selected in the Elements DOM tree (and the tree expanded/scrolled as appropriate), but instead, nothing happens.

carmacleod avatar Dec 08 '21 14:12 carmacleod

Thanks for the information, we will review and get back to you @carmacleod.

ErickRenteria avatar Dec 08 '21 16:12 ErickRenteria

Looks like Chrome has an issue selection svg via xpath. See https://stackoverflow.com/questions/6943025/selenium-cannot-find-svg-element-in-xpath

Looks like you have to use something like this to select it.

/html/body/main/div/div/div/*[local-name() = 'svg'][3]

I think we can fix this in the extension by doing a replace of /svg with *[local-name() = 'svg']

Might be slightly more complicated with the filter (clicking the SVG)

tombrunet avatar Dec 16 '21 20:12 tombrunet

Fixed in https://github.com/IBMa/equal-access/pull/1371

tombrunet avatar Mar 30 '23 19:03 tombrunet