There was an error while loading. Please reload this page.
1 parent aa80775 commit 3c5c610Copy full SHA for 3c5c610
1 file changed
book/accessibility.md
@@ -1026,14 +1026,15 @@ instead. That quirk is a workaround for our browser
1026
The `click` method can now be rewritten to call `activate_element`
1027
directly:
1028
1029
-``` {.python}
+``` {.python replace=focus%20%3d%20elt/focus_element(elt)}
1030
class Tab:
1031
def click(self, x, y):
1032
+ # ...
1033
while elt:
1034
if isinstance(elt, Text):
1035
pass
1036
elif is_focusable(elt):
- self.focus_element(elt)
1037
+ self.focus = elt
1038
self.activate_element(elt)
1039
return
1040
elt = elt.parent
0 commit comments