So I am creating a table where I need to be able to delete a row when I focus on the input field inside a cell using a button outside the table
<div tabindex="0" class="remove_row" role="button" onclick="removeRow()">
<span>Remove</span>
</div>
<table id="ListTab" role="grid">
<thead tabindex="0">
<tr role="row">
<th title="Column 1" role="columnheader">
<span>Column 1</span>
</th>
<th title="Column 2" role="columnheader">
<span>Column 2</span>
</th>
</tr>
</thead>
<tbody tabindex="0">
<tr class="UiListRow">
<td tabindex="-1" role="gridcell">
<input type="text" autocomplete="off">
</td>
<td tabindex="-1" role="gridcell">
<input type="text" autocomplete="off">
</td>
</tr>
<tr class="UiListRow">
<td tabindex="-1" role="gridcell">
<input type="text" autocomplete="off">
</td>
<td tabindex="-1" role="gridcell">
<input type="text" autocomplete="off">
</td>
</tr>
<tr class="UiListRow">
<td tabindex="-1" role="gridcell">
<input type="text" autocomplete="off">
</td>
<td tabindex="-1" role="gridcell">
<input type="text" autocomplete="off">
</td>
</tr>
</tbody>
</table>
I want when the user stand on one of the inputs and clicks remove it only removes that row.